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

关于refreshToken实现 #369

Open
gpqhl0071 opened this issue Jul 2, 2020 · 7 comments
Open

关于refreshToken实现 #369

gpqhl0071 opened this issue Jul 2, 2020 · 7 comments

Comments

@gpqhl0071
Copy link

看了下后端代码,有提供refreshToken ,刷新鉴权token的接口,但是在前端,没有找到实现的功能?

@MarsZone
Copy link

哈,看来不止我一个人有疑问。。那就是作者懒得在前端写了,但是这功能写的还是挺全的。

@gpqhl0071
Copy link
Author

嗯,等作者回复,花儿都谢了,很无语~~~~

@achunCoding
Copy link

刷新token逻辑是怎么样的,快过期的时候 然后 检测 刷新吗。

@daidai21
Copy link

daidai21 commented Sep 9, 2020

例如1min过期,每59s就去请求下,获取新的token吧,前端自己定时轮训的

@gpqhl0071
Copy link
Author

我这边前端,有自己的实现方式,当用户携带accressToken请求如果失效时,前端会携带refreshToken去获取新的accressToken。

@achunCoding
Copy link

可以参考这篇博客。刷新token 后端会返回刷新token和accessToken 当accessToken过期之后 携带刷新token去重新请求accessToken

@LDTeemo
Copy link

LDTeemo commented Nov 10, 2020

我很想知道,后台程序在哪里判断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

5 participants