feat: customizable jwt expiration date

This commit is contained in:
chenos 2022-07-20 14:15:59 +08:00
parent 21619f53c5
commit c9483254fa

View File

@ -9,7 +9,7 @@ export class JwtService {
constructor(protected options: JwtOptions) {}
private expiresIn() {
return this.options.expiresIn || '7d';
return this.options.expiresIn || process.env.JWT_EXPIRES_IN || '7d';
}
private secret() {