thankful-shoe-14315
11/26/2025, 12:06 PMReq:
GET http://localhost:4000/self-service/recovery/browser?return_to=...
Res:
{
"id": "...",
"type": "browser",
"expires_at": "2025-11-26T07:19:46.179066985Z",
"issued_at": "2025-11-26T06:49:46.179066985Z",
"request_url": "http://localhost:4000/self-service/recovery/browser?return_to=...",
"return_to": "http://localhost:3000",
"active": "link",
"ui": {
"action": "http://localhost:4000/self-service/recovery?flow=...",
"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": "link",
"attributes": {
"name": "email",
"type": "email",
"required": true,
"disabled": false,
"node_type": "input"
},
"messages": [],
"meta": {
"label": {
"id": 1070007,
"text": "Email",
"type": "info"
}
}
},
{
"type": "input",
"group": "link",
"attributes": {
"name": "method",
"type": "submit",
"value": "link",
"disabled": false,
"node_type": "input"
},
"messages": [],
"meta": {
"label": {
"id": 1070009,
"text": "Continue",
"type": "info"
}
}
}
]
},
"state": "recovery_awaiting_address"
}
When I enter an email address and submit, I see:
Req:
POST http://localhost:4000/self-service/recovery?flow=...
Body = {"email":"...","csrf_token":"...","method":"link"}
Res:
Response 303
Location = http://localhost:4000/recovery?flow=...
What's going on here? Shouldn't the endpoint be returning JSON, not a 303?thankful-shoe-14315
11/26/2025, 2:22 PMsteep-lamp-91158
Accept header to application/json?thankful-shoe-14315
11/26/2025, 3:29 PMsteep-lamp-91158
thankful-shoe-14315
11/26/2025, 3:39 PMthankful-shoe-14315
11/26/2025, 3:39 PMsteep-lamp-91158
steep-lamp-91158
1234, but then send the email as Go to https://example.com?code=1234 to recover your account
the UI would then pre-fill the code from the query, potentially not showing it to the user at all
this is generally better than magic links, as it allows you to control the step between the click and the actual submission, which can make it more reliablethankful-shoe-14315
11/26/2025, 4:06 PMthankful-shoe-14315
11/26/2025, 4:07 PMsteep-lamp-91158
steep-lamp-91158
steep-lamp-91158
steep-lamp-91158
thankful-shoe-14315
11/26/2025, 4:08 PMthankful-shoe-14315
11/26/2025, 4:10 PMsteep-lamp-91158
steep-lamp-91158
thankful-shoe-14315
11/26/2025, 4:22 PMsteep-lamp-91158
steep-lamp-91158
thankful-shoe-14315
11/26/2025, 4:49 PMthis is what i have now:Go to https://example.com?code=1234 to recover your account
If this was you, please use the following link to proceed: https://DOMAIN.com/recovery?code={{ .RecoveryCode }}