stale-dress-83211
07/31/2024, 2:28 PMsteep-lamp-91158
steep-lamp-91158
stale-dress-83211
07/31/2024, 3:03 PMsteep-lamp-91158
stale-dress-83211
07/31/2024, 4:02 PMsteep-lamp-91158
steep-lamp-91158
stale-dress-83211
07/31/2024, 4:09 PMsteep-lamp-91158
continue_with
field in the response on successsteep-lamp-91158
steep-lamp-91158
stale-dress-83211
07/31/2024, 4:12 PMstale-dress-83211
08/01/2024, 8:18 AMIn order to complete this flow please redirect the browser to: <https://URL.projects.oryapis.com/ui/settings?flow=f4cdb324-30a5-48f7-a4c1-ebcecbc96bbf>
However, as I mentioned, I'm not doing this through browser, but through native app (directly in Unity). Any ideas? Thanks in advancesteep-lamp-91158
method=code&code=1234
without the new password
in the response you get the new settings flow, you have to submit that one with the new passwordsteep-lamp-91158
stale-dress-83211
08/01/2024, 8:24 AMsteep-lamp-91158
stale-dress-83211
08/01/2024, 8:26 AMstale-dress-83211
08/01/2024, 8:41 AM{"error": {"code": 401,"status": "Unauthorized","request": "2ea0be3c-f4dc-9ae1-aa6d-f8b6b841e014","reason": "A valid Ory Session Cookie or Ory Session Token is missing.","message": "The request could not be authorized"}}
I'm aware that I can receive a session token once the user is logged in, however in this case the user doesn't know the original password and wants to reset the password while not logged in. Any possible workarounds? Thanks in advancesteep-lamp-91158
stale-dress-83211
08/01/2024, 9:02 AM{
"id": "b1672d58-e6d7-4aa6-b2fb-3da4beb41f23",
"type": "api",
"expires_at": "2024-08-01T09:51:11.65836302Z",
"issued_at": "2024-08-01T08:51:11.65836302Z",
"request_url": "<https://URL.projects.oryapis.com/self-service/recovery/api>",
"active": "code",
"ui": {
"action": "<https://URL.projects.oryapis.com/self-service/recovery?flow=b1672d58-e6d7-4aa6-b2fb-3da4beb41f23>",
"method": "POST",
"nodes": [
{
"type": "input",
"group": "default",
"attributes": {
"name": "csrf_token",
"type": "hidden",
"value": "",
"required": true,
"disabled": false,
"node_type": "input"
},
"messages": [],
"meta": {}
},
{
"type": "input",
"group": "code",
"attributes": {
"name": "email",
"type": "email",
"required": true,
"disabled": false,
"node_type": "input"
},
"messages": [],
"meta": {
"label": {
"id": 1070007,
"text": "Email",
"type": "info"
}
}
},
{
"type": "input",
"group": "code",
"attributes": {
"name": "method",
"type": "submit",
"value": "code",
"disabled": false,
"node_type": "input"
},
"messages": [],
"meta": {
"label": {
"id": 1070009,
"text": "Continue",
"type": "info"
}
}
}
]
},
"state": "choose_method"
}
2. Then I enter the code that I receive in my inbox and send a request to 'self-service/recovery?flow={the flowid again}' with body 'code=the code' 'method=code'. Response:
{"error":{"id":"browser_location_change_required","code":422,"status":"Unprocessable Entity","reason":"In order to complete this flow please redirect the browser to: <https://URL.projects.oryapis.com/ui/settings?flow=c6a9b016-e7fa-44be-876c-751f5658d10a>","message":"browser location change required"},"redirect_browser_to":"<https://URL.projects.oryapis.com/ui/settings?flow=c6a9b016-e7fa-44be-876c-751f5658d10a>"}
3. After that I parse the 'redirect_browser_to' to get only the flow id and I send a new request to 'self-service/settings?flow={the parsed flow id from the last response'}. And then I get the error with unauthorized...
I guess I'm missing something where I can get the session token?
Thanks again.stale-dress-83211
08/01/2024, 12:53 PMsteep-lamp-91158