[英]How can I restrict logged in user from logging in again using another browser/tab?
I am using reactjs with nodejs and redux to authenticate and keep track of if user is authenticated or not (for routes). 我正在使用reactjs与nodejs和redux进行身份验证,并跟踪用户是否经过身份验证(对于路由)。 I am using aws cognito for user authentication.
我正在使用aws cognito进行用户身份验证。
What does the app do: it basically takes a file from user and uploads to s3 bucket. 该应用程序做了什么:它基本上从用户获取文件并上传到s3存储桶。
What I want to accomplish: I want to restrict the user from opening a 2nd tab (in chrome for example) and logging in again. 我想要完成的任务:我想限制用户打开第二个选项卡(例如在chrome中)并再次登录。 Currently I don't have a logout button, but if they refresh their current tab, they will be logged out and will have to log in again - reason for this is, we don't need to persist the login.
目前我没有注销按钮,但是如果他们刷新当前选项卡,他们将被注销并且必须再次登录 - 原因是,我们不需要保持登录。
In addition to this, ideally we would like to restrict the user from opening say another browser and logging in. 除此之外,理想情况下,我们希望限制用户打开其他浏览器并登录。
Is there way to restrict this? 有没有办法限制这个?
If you need only 1 session to be active of one particular user. 如果您只需要一个会话就可以激活一个特定用户。
Another approach: 另一种方法:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.