fix(core): Decrease reset password token expire time (#7598)

Decrease the expiration time from 1 day to 20 minutes

Github issue / Community forum post (link here to close automatically):
This commit is contained in:
Tomi Turtiainen 2023-11-03 13:32:08 +02:00 committed by GitHub
parent b532a7bdb7
commit 2aa7f6375a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -1,5 +1,5 @@
<p>Hi {{firstName}},</p> <p>Hi {{firstName}},</p>
<p>Somebody asked to reset your password on n8n ({{ domain }}).</p> <p>Somebody asked to reset your password on n8n ({{ domain }}).</p>
<br /> <br />
<p>Click the following link to choose a new password. The link is valid for 2 hours.</p> <p>Click the following link to choose a new password. The link is valid for 20 minutes.</p>
<a href="{{ passwordResetUrl }}">{{ passwordResetUrl }}</a> <a href="{{ passwordResetUrl }}">{{ passwordResetUrl }}</a>

View file

@ -120,7 +120,7 @@ export class PasswordResetController {
const resetPasswordToken = this.jwtService.signData( const resetPasswordToken = this.jwtService.signData(
{ sub: id }, { sub: id },
{ {
expiresIn: '1d', expiresIn: '20m',
}, },
); );