most-river-7586
12/01/2023, 7:38 AMupdateLoginFlow
is returning a 422?
I'm calling it from the SDK like so, inside my SPA:
ory.createBrowserLoginFlow().then(({ data: flow }) => {
const flowId = flow.id;
ory
.updateLoginFlow({ flow: flowId, updateLoginFlowBody: { method: 'oidc', provider: 'my-okta-test' } })
.then(({ data: successRes }) => { ... })
})
but the .updateLoginFlow
call is returning a 422.
Here is the curl output of that call, which I got from my browser's networking tab:most-river-7586
12/01/2023, 7:39 AMmost-river-7586
12/01/2023, 7:39 AMbrowser_location_change_required
error was thrown, and this section might be relevant:
https://github.com/ory/kratos/blob/7c0e02efdc115b5ac9dcf7e6517a27e903c02643/selfservice/strategy/oidc/strategy_login.go#L280-L284
Are JSON requests are not supported?
Or maybe I'm not correctly configuring my call to updateLoginFlow
?
Any help is appreciated!most-river-7586
12/01/2023, 7:42 AM/self-service/login
endpoint from the kratos-selfservice-ui-node
app (which is server-side), the call succeeds and returns a 302 as expected.
Here is the curl from that request. Why is this request succeeding, but my request failing?limited-photographer-61008
12/01/2023, 2:13 PMbrowser_location_change_required: Usually sent when an AJAX request indicates that the browser needs to open a specific URL. Most likely used in Social Sign In flows.
The response body will contain a redirect_browser_to
value and you need to handle the redirect yourself.
More info here: https://www.ory.sh/docs/reference/api#tag/frontend/operation/updateLoginFlowmost-river-7586
12/01/2023, 7:33 PM