Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ember-simple-auth Password Update and Reset

I'm using ember-simple-auth and the Devise adapter for my Ember.js app. I need to create a way for users to do the following:

  1. Update their password (with new password and confirmation fields)
  2. Recover/reset their password

Is there a way to do this with ember-simple-auth or a recommended approach to doing this? My initial thought was to build this into my Ember app, but is this something I should build outside of the Ember app?

like image 257
David Avatar asked May 21 '14 20:05

David


Video Answer


1 Answers

For the password change case I don't think Ember.SimpleAuth should be involved with that really. It's basically just an authorized XHR to the server that updates the user's record. Changing the password should also not change the authentication status of the current session.

The recover/reset functionality is a bit more complex. I haven't really thought about how Ember.SimpleAuth would support or if at all. The easiest solution is probably to simply have a custom request to the server and once the password has been reset/recovered redirect to the login page where Ember.SimpleAuth kicks in. Also the question is whether you want to let the user set a new password with that request or simply generate one on the server side and send that to the user via email.

Would be great to hear some suggestions how Ember.SimpleAuth could help with that case though! Maybe something can be derived from the solution you'll build for your app or other people have built for theirs.

like image 153
marcoow Avatar answered Oct 21 '22 06:10

marcoow