Skip to content
This repository has been archived by the owner on Sep 22, 2021. It is now read-only.

Commit

Permalink
sending username in password reset email (#983)
Browse files Browse the repository at this point in the history
* sending username in password reset email

* reformulation

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>
Co-authored-by: thib <thibaut.sardan@gmail.com>
  • Loading branch information
3 people committed Aug 3, 2020
1 parent e55c658 commit 41efea8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion auth-server/src/services/email.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export const sendResetPasswordEmail = (user: User, token: string): void => {
const msg = {
from: FROM,
html: text,
subject: 'Reset Your Password',
subject: 'Username or password reset request',
text,
to: user.email
};
Expand Down
9 changes: 4 additions & 5 deletions auth-server/src/utils/emailTemplates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,14 @@ export const verificationEmailTemplate = container(`

export const resetPasswordEmailTemplate = container(`
<p>
Hi <%= username %>!<br/><br/>
Hi!<br/><br/>
It looks like you need to reset your password.<br />
Your secret is safe with us, and this will be a breeze.<br /><br />
The username association with this email is <%= username %><br /><br />
Go ahead and follow the link to reset your password:<br /><br />
If you need to reset your password, go ahead and follow this link:<br /><br />
<a href="<%= resetUrl %>">Reset Your Password</a><br /><br />
Just a heads up, to make sure your information is safe and secure, the link will expire after 24 hours.<br /><br />
Just a heads up, to make sure your information is safe and secure, the above link will expire after 24 hours.<br /><br />
If you didn't request a password change, then just ignore this message.<br /><br />
Expand Down
2 changes: 1 addition & 1 deletion front-end/src/components/Login/Web2Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ const LoginForm = ({ className, toggleWeb2Login }:Props): JSX.Element => {
{errors.password && <span className={'errorText'}>{messages.VALIDATION_PASSWORD_ERROR}</span>}

<div className='text-muted'>
<Link to='/request-reset-password'>Forgot your password?</Link>
<Link to='/request-reset-password'>Forgot your password or username?</Link>
</div>
</Form.Field>
</Form.Group>
Expand Down

0 comments on commit 41efea8

Please sign in to comment.