Skip to content
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

Forgot Password flow with JSON responses #888

Closed
bsbeeks opened this issue May 13, 2017 · 2 comments
Closed

Forgot Password flow with JSON responses #888

bsbeeks opened this issue May 13, 2017 · 2 comments

Comments

@bsbeeks
Copy link

bsbeeks commented May 13, 2017

Is is possible to have the GET auth/password/edit endpoint return a url string, or the needed headers/tokens to reset the user's password, instead of redirecting? The way our applications are set up, the Rails app that is using devise_token_auth can't controller the User's experience...it's strictly a JSON API.

@nicholasshirley
Copy link

This is possible. Override the passwords controller, delete the redirect logic and send back the headers instead. I do this in an app, but I had to turn off config.check_current_password_before_update completely. Without the redirects it seems allow_password_change never gets set to true so there's no opportunity to give a new password without the old password if it's on, but I couldn't tell you why.

@zachfeldman
Copy link
Contributor

Workaround posted, closing for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants