-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Opening reset password page with no token when there is no new_user_session_path raises error #4923
Comments
The error you are getting comes from the base views provided by devise, which does make some assumptions about having the core routes defined (including the sessions controller). You want to override
|
Thanks for the response colinross! That error comes from the I'm not using the |
Hey @bruno-campos, thanks for reporting this. We don't have full support for API-only applications, so that's why this happens. You'll see that in some places we using a conditional to avoid the redirects, so if want to open a pull request for this it'd be welcome. |
I've thought about adding 'api-only' support directly into devise (since I have used it like this a couple times and the overriding gets tedious, like likely many here).
I'm willing to put some time towards this, but I'd want at least a nod from the core-devs as to the direction they would prefer, even if it was just 'be smart about sniffing out if we are in an API or Standard controller, and be consistent about handling redirects/views |
Closing to move the discussion to #4947 |
Environment
Current behavior
In an application where I do not have sessions path (use mostly as API and only left confirmations and passwords routes for email confirmation and password reset).
When visiting the reset password page without a token:
Visit:
http://HOST/users/password/edit
It will try to redirect to new_user_session_path and raise error:
Expected behavior
I would expect an error saying that the token is invalid or not present.
The text was updated successfully, but these errors were encountered: