nutritious-petabyte-34160
12/20/2022, 8:25 AMmagnificent-energy-493
faint-helmet-53309
12/20/2022, 8:36 PMfaint-helmet-53309
12/20/2022, 8:36 PMadamant-angle-54989
12/21/2022, 11:11 AMdata: {
error:{
"id": "browser_location_change_required",
"code": 422,
"status": "Unprocessable Entity",
"reason": "In order to complete this flow please redirect the browser to: /ui/settings?flow=18f615f2-43cb-457b-9b79-c695526bf0fe",
"message": "browser location change required"
}
redirect_browser_to: '/ui/settings?flow=18f615f2-43cb-457b-9b79-c695526bf0fe'
}
faint-helmet-53309
12/21/2022, 11:12 AMfaint-helmet-53309
12/21/2022, 11:12 AMadamant-angle-54989
12/21/2022, 11:13 AMadamant-angle-54989
12/21/2022, 11:13 AMfaint-helmet-53309
12/21/2022, 11:13 AMfaint-helmet-53309
12/21/2022, 11:14 AMadamant-angle-54989
12/21/2022, 11:16 AMheaders: {
date: 'Wed, 21 Dec 2022 11:00:00 GMT',
'content-type': 'application/json',
'content-length': '348',
connection: 'close',
b3: '0000000000000000e1a0253d74b6c56c-48a3e94719379d3c-1',
'cache-control': 'private, no-cache, no-store, must-revalidate',
'set-cookie': [Array],
'uber-trace-id': '0000000000000000e1a0253d74b6c56c:48a3e94719379d3c:0:1',
vary: 'Origin,Cookie',
'x-b3-sampled': '1',
'x-b3-spanid': '48a3e94719379d3c',
'x-b3-traceid': '0000000000000000e1a0253d74b6c56c',
'cf-cache-status': 'DYNAMIC',
server: 'cloudflare',
'cf-ray': '77d01c899f0b8ae1-DEL',
'alt-svc': 'h3=":443"; ma=86400, h3-29=":443"; ma=86400'
}
faint-helmet-53309
12/21/2022, 12:46 PMfaint-helmet-53309
12/21/2022, 12:47 PMfaint-helmet-53309
12/21/2022, 12:47 PMadamant-angle-54989
12/23/2022, 9:33 AMmagnificent-energy-493
API-initiated flows expectto be sent in the body and respond with HTTP 200 and an application/json body with the session token on success; HTTP 303 redirect to a fresh settings flow if the original flow expired with the appropriate error messages set; HTTP 400 on form validation errors. HTTP 401 when the endpoint is called without a valid session token. HTTP 403 whenapplication/json
was reached or the session’s AAL is too low. Implies that the user needs to re-authenticate.selfservice.flows.settings.privileged_session_max_age
Browser flows without HTTP Headeror withAccept
respond with a HTTP 303 redirect to the post/after settings URL or theAccept: text/*
value if it was set and if the flow succeeded; a HTTP 303 redirect to the Settings UI URL with the flow ID containing the validation errors otherwise. a HTTP 303 redirect to the login endpoint whenreturn_to
was reached or the session’s AAL is too low.selfservice.flows.settings.privileged_session_max_age
Browser flows with HTTP Headerrespond with HTTP 200 and a application/json body with the signed in identity and aAccept: application/json
header on success; HTTP 303 redirect to a fresh login flow if the original flow expired with the appropriate error messages set; HTTP 401 when the endpoint is called without a valid session cookie. HTTP 403 when the page is accessed without a session cookie or the session’s AAL is too low. HTTP 400 on form validation errors.Set-Cookie
adamant-angle-54989
12/28/2022, 10:58 AM/self-service/recovery/api
to get recovery flow, it works fine and I get a flow id
step 2. using this flow id I call POST /self-service/recovery?flow=<flow_id>
to get recovery code on email by passing request body as { method: 'code', email: <my_email> }
it works fine and I get recovery code on email
Step 3. again using same flow Id I call POST /self-service/recovery?flow=<flow_id>
to submit otp by passing request body as { method: 'code', code: <code_from_email>}
but the API return status 422
instead of 200
with message as message: 'In order to complete this flow please redirect the browser to: /ui/settings?flow=93b5be58-24d2-48ba-bb3a-e833b6'
in response header I get set-cookie
which contains an array with csrf_token and session_token, I try to hit POST /self-service/settings?flow=93b5be58-24d2-48ba-bb3a-e833b6
with request body`{ method: 'password', password: <my_new_password>}` along with received headers, it gives me 400
error saying that The HTTP Request Header included the "Cookie" key, indicating that this request was made by a Browser. The flow however was initiated as an API request. To prevent potential misuse and mitigate several attack vectors including CSRF, the request has been blocked. Please consult the documentation.
magnificent-energy-493
adamant-angle-54989
12/28/2022, 12:21 PMmagnificent-energy-493