update
This commit is contained in:
@@ -160,17 +160,11 @@ export class RedisTokenStore implements Store<OauthUser> {
|
||||
case 'week':
|
||||
expire = 7 * 24 * 60 * 60;
|
||||
break;
|
||||
case 'month':
|
||||
expire = 30 * 24 * 60 * 60;
|
||||
break;
|
||||
case 'season':
|
||||
expire = 90 * 24 * 60 * 60;
|
||||
break;
|
||||
default:
|
||||
expire = 7 * 24 * 60 * 60; // 默认过期时间为7天
|
||||
}
|
||||
} else {
|
||||
expire = Math.min(expire, 60 * 60 * 24 * 30, 60 * 60 * 24 * 90); // 默认的过期时间最大为90天
|
||||
expire = Math.min(expire, 60 * 60 * 24 * 30); // 默认的过期时间最大为30天
|
||||
}
|
||||
|
||||
await this.set(accessToken, JSON.stringify(value), expire);
|
||||
|
||||
Reference in New Issue
Block a user