This commit is contained in:
xiongxiao
2026-03-21 15:11:47 +08:00
committed by cnb
parent 8184994b2c
commit 56a55ac5ae

View File

@@ -160,17 +160,11 @@ export class RedisTokenStore implements Store<OauthUser> {
case 'week': case 'week':
expire = 7 * 24 * 60 * 60; expire = 7 * 24 * 60 * 60;
break; break;
case 'month':
expire = 30 * 24 * 60 * 60;
break;
case 'season':
expire = 90 * 24 * 60 * 60;
break;
default: default:
expire = 7 * 24 * 60 * 60; // 默认过期时间为7天 expire = 7 * 24 * 60 * 60; // 默认过期时间为7天
} }
} else { } 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); await this.set(accessToken, JSON.stringify(value), expire);