Redirect problem after login to refresh privileged session
Nobody has claimed this yet.
- Dominant language
- Shell
- Stars
- 96
- Forks
- 8
- PR merge metrics
- No merged PRs in 30d
Description
Preflight checklist
- I could not find a solution in the existing issues, docs, nor discussions.
- I agree to follow this project's Code of Conduct.
- I have read and am following this repository's Contribution Guidelines.
- This issue affects my Ory Cloud project.
- I have joined the Ory Community Slack.
- I am signed up to the Ory Security Patch Newsletter.
Describe the bug
When the user needs to login to refresh a privileged session (e.g. from the settings page), it is redirected from the current page to the login page with the following return_to url:
http://ory.domain.com/self-service/settings?flow=FLOW_ID
After a successful login, the login page should redirect the user to the address at return_to (above).
Redirecting the user there ends up in the settings page. Calling GetSelfServiceSettingsFlow at that stage provides a flow with the error below and the user needs to repeat the last action:
Unable to decode body because HTTP Request Method was "GET" but only [POST PUT PATCH] are supported.
We assume this is a bug and that at this stage we should have a settings flow updated after completing the operation the user tried to perform. We also tried to compare the settings flow from the first call and after the login, but they are pretty much the same, so no clue on what should be done differently.
Please advise.
Reproducing the bug
- Configure your Ory Session privileged timeout to a small interval (e.g. 30s)
- Go your custom kratos ui settings page
- Execute a privileged action (e.g. reveal backup recovery codes)
- Wait for redirect to login
- Enter the correct credentials
- Wait fo redirect back to settings
- The error message is shown and the privileged action is not executed
Relevant log output
No response
Relevant configuration
No response
Version
0.0.1-alpha.169
On which operating system are you observing this issue?
Windows
In which environment are you deploying?
Docker Compose
Additional Context
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no files or tests; begin by reproducing the privileged-session flow from the custom settings page, using the documented return_to URL and GetSelfServiceSettingsFlow call. Trace the login redirect and verify that returning to settings completes the privileged action without the GET-method error or requiring the user to repeat it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker-compose
- Domain
- authentication
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100