Skip to content

CORS error on registration but not login #2088

Answered by calaracey
calaracey asked this question in Q&A
Discussion options

You must be logged in to vote

I have discovered the cause of the problem. I mistakenly believed that the parameters on the submitSelfServiceRegistration method in the Ory/kratos-client JS SDK were the same as the submitSelfServiceLogin method. As you can see, the submitSelfServiceLogin has an optional second parameter (xSessionToken) that registration does not have:

async submitSelfServiceLoginFlow(flow: string, xSessionToken?: string, submitSelfServiceLoginFlowBody?: SubmitSelfServiceLoginFlowBody, options?: any)

async submitSelfServiceRegistrationFlow(flow: string, submitSelfServiceRegistrationFlowBody?: SubmitSelfServiceRegistrationFlowBody, options?: any)

I successfully used this API call to login:
submitSelfServi…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@vinckr
Comment options

Answer selected by calaracey
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants