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

sending username in password reset email #983

Merged
merged 4 commits into from
Aug 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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