You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 25, 2024. It is now read-only.
Bug report(问题描述)
用户登录后设置token的过期时间多乘了1000 (const ex = 7 * 24 * 60 * 60 * 1000;不应该乘以1000)。
见 \src\store\modules\user.ts 中的第 58 行:
const ex = 7 * 24 * 60 * 60 * 1000;
Storage.set() 方法的expire参数,看起来是以秒为单位的。
另外,后端提供token的接口,一般会返回一个“过期时间”。比如我的后端接口就会返回一个字段:expireInSeconds。一天就是 24 * 60 * 60 = 86400 秒。所以我会把token的过期时间,设置为 this.setToken(authorization, data?.expireInSeconds);
您现在是硬编码在前端代码里了,并不是真正的过期时间。
The text was updated successfully, but these errors were encountered: