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

Add password reset #295

Merged
merged 4 commits into from
May 16, 2019
Merged

Add password reset #295

merged 4 commits into from
May 16, 2019

Conversation

freezy
Copy link
Member

@freezy freezy commented May 15, 2019

This adds an API to reset a user's password. It works like that:

  1. The user requests a password reset for a given email
  2. An email is sent with a link to reset
  3. The link contains a token, with which the user can set a new password

Notes

  • The API returns if the email is unknown (no "If we found your email, we've sent you one" message)
  • If the email is registered with an OAuth account that doesn't have a password, the name of the OAuth provider is returned.
  • The token is valid for 24 hours.
  • There is no "forgot email" link. The email has to be known.

Todo

  • Rate limit the reset and request endpoint

This PR closes #264.

@freezy freezy self-assigned this May 15, 2019
@codecov
Copy link

codecov bot commented May 16, 2019

Codecov Report

Merging #295 into master will increase coverage by 5.04%.
The diff coverage is 89.39%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #295      +/-   ##
==========================================
+ Coverage   85.65%   90.69%   +5.04%     
==========================================
  Files         175      175              
  Lines        6572     6620      +48     
  Branches      530      535       +5     
==========================================
+ Hits         5629     6004     +375     
+ Misses        801      473     -328     
- Partials      142      143       +1
Impacted Files Coverage Δ
src/app/common/slackbot.ts 100% <ø> (ø) ⬆️
src/app/releases/release.api.ts 96.91% <ø> (+6.17%) ⬆️
src/app/users/user.api.ts 80.85% <100%> (+31.2%) ⬆️
src/app/profile/profile.api.router.ts 100% <100%> (ø) ⬆️
src/app/common/api.ts 77.41% <100%> (+4.03%) ⬆️
src/app/media/medium.api.ts 100% <100%> (ø) ⬆️
src/app/comments/comment.api.ts 100% <100%> (ø) ⬆️
src/app/authentication/authentication.api.ts 98.36% <100%> (ø) ⬆️
src/app/users/user.schema.ts 85.98% <63.63%> (-0.48%) ⬇️
src/app/common/mailer.ts 82.9% <66.66%> (+3.77%) ⬆️
... and 35 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2b093cb...af5101a. Read the comment docs.

@freezy freezy added the Feature label May 16, 2019
@freezy freezy merged commit 5953170 into master May 16, 2019
@freezy freezy deleted the feature/password-reset branch May 16, 2019 21:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add password retrieval
1 participant