登录接口返回的过期时间是access token 的过期时间,但是被错误地设置在了refresh token 上,这导致过了几分钟登录状态便失效要求重新登录

This commit is contained in:
周建 2023-06-19 13:08:56 +08:00
parent ec4a5ec961
commit 73cd6e303d

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)
}