-
-
Notifications
You must be signed in to change notification settings - Fork 964
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
There is no way to tell the difference between a user who signed in and a user who is in the recovery mode #1322
Comments
Something definitely isn't right here. I initialize the recovery from the browser and I am logged out, no session cookies set in the browser. I receive the email with the flow and token. I click on the link from the email and am taken to the When I have no cookies, as in, via cURL, I get the redirect to the So far, so good. According to the documentation at https://www.ory.sh/kratos/docs/self-service/flows/account-recovery#recovery-for-browser-clients, this is the expected behavior. This brings me to the conclusion that my original thinking was correct and the question stands: is there a method to distinguish between a user who is signed in and a user who is in recovery mode? |
Hi @aeneasr, would a simple flag like that work for you? If yes, then all the blocking of actions that should not be allowed to a |
The #1323 PR introduces the recovery session. With that flag, it's really easy to distinguish between the intent to recover and a signed in user. The video shows the concept. kratos-recovery-session.mp4 |
Account recovery is essentially a privileged session which allows one to update their credentials, thus it is analogous to setting a session. Resetting a password is not all that you can do here, it might also be to recover a broken link to an OIDC provider. Thus, the flow is more complex than showing a mask for changing the password! However, adding a flag to indicate a recovery session is definitely a good idea! |
Once #1624 is merged you will get a list of authentication methods in the session where |
Is your feature request related to a problem? Please describe.
Initializing a recovery process sends an email with the recovery to the user. The user clicks the link and is taken to the application
selfservice.settings.ui_url
. Now the following has happened:/self-service/recovery
process/sessions/whoami
and retrieve all dataIs this behavior desired?
Describe the solution you'd like
I'd expect that the recovery session is a temporary session without profile info and allowing only password reset and not a full profile edit. I'd expect this session not to be able to request a new settings flow, as in, if it expired, the user should have to reinit only via recovery.
Currently there is really no way to tell the difference between a user who signed in and a user who is in the recovery mode.
Maybe there should be some sort of
recovery
flag on the session object?Describe alternatives you've considered
If there was the recovery type of a flag on the session object, it would be possible to limit the scope of changes the user is allowed to do.
Additional context
N/A
The text was updated successfully, but these errors were encountered: