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

高并发下,token过期怎么处理? #42

Open
oyosc opened this issue Aug 31, 2018 · 0 comments
Open

高并发下,token过期怎么处理? #42

oyosc opened this issue Aug 31, 2018 · 0 comments

Comments

@oyosc
Copy link

oyosc commented Aug 31, 2018

你好,我通过你的项目自己写了一个博客,在里面新加了评论,token功能等,react+koa+mongodb+redis 个人技术博客

但是现在遇到了一个问题,就当你在高并发或者不断刷新时,会提示token已经使用过一次,请重新登录。我这边的规则是token使用了一次就不能再继续使用,所以会出现多个请求带着相同的token来请求,这就导致后面的请求可能会出现token已经使用了一次而需要重新登录的问题,目前解决的方案是把请求里带的token头以key存到redis里,但是还是有可能会出现redis里没有这个token的key,想问下还有没有其他的解决办法呢?

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

1 participant