-
Notifications
You must be signed in to change notification settings - Fork 46
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
create_with_otp destroys existing session #39
Comments
@borgand is this still relevant? what would be the acceptable behaviour? |
Hi! Two main aspects:
Therefore I still suggest this to be fixed. Acceptable behaviour would be that the session data is persisted during an OTP challenge. 😄 |
Thanks for a quick reply. I'll look into it. |
Btw this commit probably fixed the location at least (but I understand there are other possible issues) 7c2fbe9 |
Do I understand it correctly that this is only due to use of Devise Security Extensions plugin? Like due to logging out this is not compatible? |
The
DeviseOtpAuthenticatable::Hooks::Sessions#create_with_otp
method destroys previous data inwarden.session
when OTP challenge is required. See sessions.rb:23This conflicts with many important features of Devise and related plugins, such as:
return_to
functionality is ignored - user is redirected to root URL instead of requested resource when authentication is completepassword_expired
information is lost in the Devise Security Extensions plugin, meaning that the users are not required to change their passwords, regardless that they are actually expired.I tried to tweak the code to get around this, but failed as I'm not familiar with the concepts of Devise-OTP.
Can the Devise-OTP functionality be altered so that previous session information is persisted? This seems reasonable, taking into account that OTP most often is used together with another authentication mechanism to form 2FA and that other mechanism can expect session to persist once created.
The text was updated successfully, but these errors were encountered: