We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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,但是后端并没有进行任何存储,而在下次请求的时候jwt.verify直接读取出来,这是什么原理,从哪里读取出来的?我之前知道可以存储在数据库,session,或者redis中,而您的这种做法相比较有什么优劣势。假如是多用户的网站,给不同的用户下发token,也能这样来不存储token进行处理吗?
The text was updated successfully, but these errors were encountered:
token是交给前端存储了,后端只做生成和验证token,这种方法是比较轻量级,不需要存储太多的东西在后端。给不同用户发不同token,客户端请求时,再传过来各自的token,后端用jwt验证通过了就ok,不通过就不能访问接口。是可以的。
Sorry, something went wrong.
No branches or pull requests
我看您在后端接收到请求的时候派发给前端一个token,但是后端并没有进行任何存储,而在下次请求的时候jwt.verify直接读取出来,这是什么原理,从哪里读取出来的?我之前知道可以存储在数据库,session,或者redis中,而您的这种做法相比较有什么优劣势。假如是多用户的网站,给不同的用户下发token,也能这样来不存储token进行处理吗?
The text was updated successfully, but these errors were encountered: