Skip to content

Commit fe4476b

Browse files
authored
fix: forgotten password - extend reset token expire time (#1556)
* forgot password - set password expire after 12h * set expire to 8h and add notification message in the email
1 parent 1620a87 commit fe4476b

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

packages/wallet/backend/src/email/templates/forgotPassword.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@ export const getForgotPasswordEmailTemplate = (url: string): string => {
3939
</a>
4040
</td>
4141
</tr>
42+
<tr>
43+
<td>
44+
<p style="font-size:12px;line-height:24px;margin:10px 0 0px 0;color:#000">Password reset link will expire in 8 hours.</p>
45+
</td>
46+
</tr>
4247
<tr>
4348
<td>
4449
<p style="font-size:12px;line-height:24px;margin:16px 0 2px 0;color:#000">If you didn&#x27;t request this email, there&#x27;s nothing to worry about, you can safely ignore it.</p>

packages/wallet/backend/src/user/service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ export class UserService implements IUserService {
7373

7474
const resetToken = getRandomToken()
7575
const passwordResetToken = hashToken(resetToken)
76-
const passwordResetExpiresAt = new Date(Date.now() + 10 * 60 * 1000)
76+
const passwordResetExpiresAt = new Date(Date.now() + 8 * 3600 * 1000)
7777

7878
await User.query()
7979
.findById(user.id)

0 commit comments

Comments
 (0)