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

Password reset functionality #67

Closed
timwis opened this issue Sep 5, 2016 · 2 comments
Closed

Password reset functionality #67

timwis opened this issue Sep 5, 2016 · 2 comments

Comments

@timwis
Copy link
Owner

timwis commented Sep 5, 2016

When a user forgets their password, they should be able to reset it via email authentication.

This is a huge pain in the butt. Makes me wish we went with Firebase, which offers it out of the box. Here's what I'm thinking so far:

  • user hits reset password
  • client app creates reset-token doc { type: ‘password-reset-token’, created: ‘2016-09-05T01:23:45Z’, user: ‘tester’, token: null }
    • but how to give anonymous users write access but not read access?
  • server listens for new reset-token docs with null tokens
    • generate a token and update the doc with it (can it be hashed in case db is compromised?)
    • sends an email to the user with a link that includes the token (we’ll need to capture their email on signup)
  • user receives a reset email with link /reset-password?token=xzcv098welkr
  • client app generates a form with that token. form posts to server’s /reset-password api endpoint
  • server, logged in as an admin, changes the user’s password

Other ideas:

  • What if we just use oauth?
  • SuperLogin looks like a pretty robust solution, but seems like more than I need.
  • CouchDB-XO_Auth
@timwis timwis modified the milestone: MVP Sep 5, 2016
@timwis timwis mentioned this issue Sep 5, 2016
@timwis timwis closed this as completed in #69 Sep 5, 2016
@timwis timwis removed this from the MVP milestone Sep 7, 2016
@timwis
Copy link
Owner Author

timwis commented Sep 7, 2016

Reopening as we need a user-driven reset function. The above pull request lets admins reset passwords.

@timwis timwis reopened this Sep 7, 2016
@timwis timwis mentioned this issue Sep 8, 2016
@timwis
Copy link
Owner Author

timwis commented Sep 8, 2016

Closing in favor of https://github.com/timwis/enviar/milestone/4

@timwis timwis closed this as completed Sep 8, 2016
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

1 participant