mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
refactor(editor): Extract @n8n/i18n package for internationalization (no-changelog) (#15466)
This commit is contained in:
@@ -5,6 +5,7 @@ import { Service } from '@n8n/di';
|
||||
import { createHash } from 'crypto';
|
||||
import type { NextFunction, Response } from 'express';
|
||||
import { JsonWebTokenError, TokenExpiredError } from 'jsonwebtoken';
|
||||
import type { StringValue as TimeUnitValue } from 'ms';
|
||||
import { Logger } from 'n8n-core';
|
||||
|
||||
import config from '@/config';
|
||||
@@ -180,7 +181,7 @@ export class AuthService {
|
||||
return user;
|
||||
}
|
||||
|
||||
generatePasswordResetToken(user: User, expiresIn = '20m') {
|
||||
generatePasswordResetToken(user: User, expiresIn: TimeUnitValue = '20m') {
|
||||
const payload: PasswordResetToken = { sub: user.id, hash: this.createJWTHash(user) };
|
||||
return this.jwtService.sign(payload, { expiresIn });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user