Expiration time should not set on the refresh token

登录接口返回的过期时间是`access token` 的过期时间,但是被错误地设置在了`refresh token` 上,这导致过了几分钟登录状态便失效要求重新登录
This commit is contained in:
呵呵大 2023-06-10 03:19:03 +00:00 committed by Gitee
parent 3e549a6862
commit 5554d7c995
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -20,7 +20,7 @@ export const getRefreshToken = () => {
// 设置token
export const setToken = (token: TokenType) => {
wsCache.set(RefreshTokenKey, token.refreshToken, { exp: token.expiresTime })
wsCache.set(RefreshTokenKey, token.refreshToken)
wsCache.set(AccessTokenKey, token.accessToken)
}