5

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?

David
  • 1,330
  • 17
  • 31

1 Answers1

6

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.

marcoow
  • 4,062
  • 1
  • 14
  • 21
  • 2
    I'm not sure this is really the responsibility of your lib. I can see how it *could* be shoved into it, but it's a simple request to the server to do recover/reset, and it should probably be handled over email, meaning server-side only. – Josh Smith Jun 02 '14 at 07:04