Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JWT过期刷新问题. #3

Open
Crow8088 opened this issue Mar 30, 2019 · 1 comment
Open

JWT过期刷新问题. #3

Crow8088 opened this issue Mar 30, 2019 · 1 comment

Comments

@Crow8088
Copy link

比如早上7点登录,这时候过期时间会是19点,那么我在18点点时候操作了后台.这时候的JWT过期时间是什么时候呢?还是19点吗?还是会自动续期到6点?

@yuangang19880212
Copy link

目前不会自动续期,如果过期了,会回到登录页面,重新登录。
如果需要自己续期,我个人建议可以采用客户端监听过期时间,也就是在第一次到服务端获得Token的时候,把过期时间也返回给客户端,可以增加2分钟的差异,客户端每次调用接口之前,先判断当前时间和过期时间对比,如果过期,则到服务器重新请求token。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants