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

auth:password-reset-confirm-success never seems to be broadcast #353

Open
stansongman opened this issue Apr 18, 2017 · 1 comment
Open

Comments

@stansongman
Copy link

stansongman commented Apr 18, 2017

I'm using ng-token-auth on my mobile app (ionic/angular) with Devise Token Auth on rails backend. I've been struggling with the password reset process. 'auth:password-reset-confirm-success' is never broadcast after I click on the reset email link. I may just be doing this all wrong, but I wanted to do the password reset from the app after the user hit the confirm link in the email, rather than posting a web form, having them reset there, then go back to the app, etc.

UPDATE: To get the broadcast, you need to have ValidateToken run. my $authProvider.configure:

.config(function($authProvider,apiUrl){
              $authProvider.configure({
                        apiUrl: apiUrl,
                        forceValidateToken: true,
                        storage: 'localStorage'
                  });
})

Then after making the reset request call, I change the state back to SignIn, which forces a page load and ValidateToken, and I get the broadcast. Now, onto handling the password reset from the app.

Never mind, it doesn't work the way I had imagined. I am unable to make password reset work between my mobile app and the rails server.

@mxmzb
Copy link

mxmzb commented Sep 5, 2017

I am trying to achieve just the same, my optimal password reset flow would be:

  1. user requests reset mail from the app
  2. user receives email and clicks the reset link from the mail
  3. user is redirected to the app from there (whether it's emulated on my localhost in dev environment or on the app on a real device)
  4. user is signed in for one session and is asked to set a new password

however, I can't get the bit in 3. working where the user is signed in after the click on the link. any help or clarification whether this can even work as I hope is highly appreciated.

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

2 participants