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这个逻辑是不是不太好
The text was updated successfully, but these errors were encountered:
分情况了,如果只允许一台设备登录的话,肯定是要每次都创建新的Token,这样旧设备自然而然就会退出登录(也就是常说的“顶号”)。
如果允许多台设备登录,那可以使用同一个Token,不过Token也要设置有效期,防止泄露被别人使用。
Sorry, something went wrong.
是哦,这样一想确实是这么个道理,但我现在在想怎么实现顶号的逻辑呢。
如果用户A登录了一个帐号,现在用户B在别处也登录了这个帐号。这个时候如果用户A刷新了一下页面,经过了拦截器后用户A肯定会被通知已经被顶号,但如果用户A没有刷新这个页面呢,咋触发通知让他知道被顶号了呢?
求指教
例如后台会有一些轮训线程在请求时发现已退出登录。
觉的应该是每次登陆时候创建一个token
No branches or pull requests
本人小白。
感觉重复登录的时候会再次创建token这个逻辑是不是不太好
The text was updated successfully, but these errors were encountered: