-
Notifications
You must be signed in to change notification settings - Fork 1
Feat: Reset password flow #43
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
Conversation
src/services/user.ts
Outdated
| email, | ||
| }, | ||
| }); | ||
| if (!user) throw new ApiError(errors.INVALID_EMAIL); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's not tell the potential user whether the email is valid or not
The idea would be to prevent someone to use this feature to confirm whether certain email is from one of our users or not.
| ).rejects.toThrow(new ApiError(errors.INVALID_CODE)); | ||
| }); | ||
|
|
||
| test('code is expired', async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about the case the token doesn't exist? 😬
jrg091
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just one small comment on a possible new test and I'm ok to be merged 😬
| html | ||
| head | ||
| title #{appName} password reset code | ||
| body | ||
| h1 Hello #{username}, | ||
| p To recover your password use the next code #{code} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| html | |
| head | |
| title #{appName} password reset code | |
| body | |
| h1 Hello #{username}, | |
| p To recover your password use the next code #{code} | |
| html | |
| head | |
| title #{appName} password reset code | |
| body | |
| h1 Hello #{username}, | |
| p To recover your password use the next code #{code}. |
da892d2 to
8ee7a4f
Compare
NOTION Ticket
Type of change
Description of the change
Create flow for updating user password and adding tests for it.
Flow includes requesting an OTP code, which is send through an email, and validating it for updating the password