-
Notifications
You must be signed in to change notification settings - Fork 45
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
Issue with multiple models using otp strategy #86
Comments
Hi @paweld-iRonin, thanks for the heads up! The scope should be set automatically by the devise controller, but there could be a route conflict, or something else going on that I am not aware of. Is there any way you could post a copy of your routes file? I will see what I can do from my side, as well. |
OK, I see what is going on - my admin and user routes are just separated by subdomain, so there is no conflict in my application. Let me see what I can do. |
@strouptl thank you! |
Hello @strouptl any news on this? |
Hi @paweld-iRonin, thank you for your patience. I have a simple fix ready for you, and am submitting a PR now. |
@strouptl I really appreciate your help, thank you |
My pleasure! Thanks for bringing it to our attention. |
Hello 👋
I ran into an issue with the setup, where I had two models using the strategy. The first one is
User
and the second one isAdmin
. When I'm usingAdmin
, after setting up the QR code I'm redirected to the path forUser
- the redirection is initiated here: https://github.com/wmlele/devise-otp/blob/master/app/controllers/devise_otp/devise/otp_tokens_controller.rb#L36 - I think this issue exists because the redirection is not scoped for the current resource. Can we fix it quickly or it's more complex change?The text was updated successfully, but these errors were encountered: