🔒 fix(auth.service.ts): Увеличивает срок действия refresh токена до 60 дней для улучшения безопасности.

This commit is contained in:
Oscar
2026-06-09 10:30:17 +03:00
parent 1662bb7dc8
commit 97f8891861

View File

@@ -145,14 +145,14 @@ export class AuthService {
const accessToken = this.jwtService.sign(payload);
const refreshToken = this.jwtService.sign(
{ ...payload, type: 'refresh' },
{ expiresIn: '30d' },
{ expiresIn: '60d' },
);
await this.redisService.set(
`refresh_token:${userEntity.id}`,
refreshToken,
'EX',
60 * 60 * 24 * 30,
60 * 60 * 24 * 60,
);
return { accessToken, refreshToken };