-
Notifications
You must be signed in to change notification settings - Fork 968
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Recovery self service flow does not pass on redirect_to URL #914
Comments
Seems like the redirect happens here:
|
I took some time to study the code. When the recovery flow is completed, a new settings flow is created and the user is redirected the settings UI with a flow token: kratos/selfservice/strategy/link/strategy_recovery.go Lines 332 to 344 in 48078e9
This is sensible since the user is bound to change his password. Unfortunately, this is currently not compatible with the return URL mechanism. I see 2 options:
The later seems more relevant since as mentioned before the user is bound to change his password. What's your take on this? |
Thank you for thinking about this @Beetix ! I don't think the second option is valid, it can easily be abused by an attacker to present you a phony "update your password ;) ;)" UI which is actually a phishing site. What we could do though is calling the return_to URL once the settings flow was completed! |
Yes, calling the return_to URL after the settings flow seems better. I have proposed these ideas while trying to figure out a way to focus the user on changing his password. The issue with the settings flow is that a user can update his profile instead of his password (which is what really matters in a recovery). |
If you want to prevent that you can omit the other fields in the UI. It will probably change with #929 so that traits and password are separated anyway. |
Yes, resolving #929 seems to be the answer to my problem. Having a single URL for both is problematic. If I hide the fields in the UI it means that I'll never be able to change these settings. |
You can hide them conditionally, e.g. depending on the referrer or some query parameter. |
Has this been implemented yet? I'm also looking for a solution to get back to a third party app (which uses hydra) after a user requests recovery or when creating a user in kratos and sending out an invite email with the recovery url |
The recovery flow should pass on the
return_to
or...recovery.after.default_browser_return_url
to the following settings flow. This way the user ends up at the correct page after it completed all steps required for recovery.Start here:
kratos/selfservice/strategy/link/strategy_recovery.go
Line 456 in 48078e9
The text was updated successfully, but these errors were encountered: