feat: add cooldown to refresh token security (#1736)
This commit is contained in:
@ -61,6 +61,10 @@ export class EnvironmentService {
|
||||
return this.configService.get<string>('REFRESH_TOKEN_EXPIRES_IN') ?? '90d';
|
||||
}
|
||||
|
||||
getRefreshTokenCoolDown(): string {
|
||||
return this.configService.get<string>('REFRESH_TOKEN_COOL_DOWN') ?? '1m';
|
||||
}
|
||||
|
||||
getLoginTokenSecret(): string {
|
||||
return this.configService.get<string>('LOGIN_TOKEN_SECRET')!;
|
||||
}
|
||||
|
||||
@ -76,6 +76,9 @@ export class EnvironmentVariables {
|
||||
@IsDuration()
|
||||
@IsOptional()
|
||||
REFRESH_TOKEN_EXPIRES_IN: string;
|
||||
@IsDuration()
|
||||
@IsOptional()
|
||||
REFRESH_TOKEN_COOL_DOWN: string;
|
||||
|
||||
@IsString()
|
||||
LOGIN_TOKEN_SECRET: string;
|
||||
|
||||
Reference in New Issue
Block a user