相同的设备标识dice只保证一个auth-token生效,清除掉多余的同一个dice多余的auth-token

This commit is contained in:
2026-03-05 12:21:31 +08:00
parent 13d8adbfe0
commit 74612f136e
4 changed files with 68 additions and 1 deletions

View File

@@ -9,6 +9,8 @@ return [
'auth_token_time_tolerance' => (int) env('API_AUTH_TOKEN_TIME_TOLERANCE', 300),
// auth-token 有效期(秒),默认 24 小时
'auth_token_exp' => (int) env('API_AUTH_TOKEN_EXP', 86400),
// auth-token 按设备存储的 Redis key 前缀(同一设备只保留最新一个 auth-token
'auth_token_device_prefix' => env('API_AUTH_TOKEN_DEVICE_PREFIX', 'api:auth_token:'),
// user-token 有效期(秒),默认 7 天
'user_token_exp' => (int) env('API_USER_TOKEN_EXP', 604800),
// 用户信息 Redis 缓存过期时间(秒),默认 7 天