admin管理员组文章数量:1026989
I'm developing a reactjs based application. I want to limit the login from multiple devices at one time to an account. So I need to have an ID that is unique and fixed on device.
I also want the user to stay logged in on one device, so I can not use IP address.
Also, I've already limited access from several browsers.
Thanks a lot. Also, sorry for my English.
I'm developing a reactjs based application. I want to limit the login from multiple devices at one time to an account. So I need to have an ID that is unique and fixed on device.
I also want the user to stay logged in on one device, so I can not use IP address.
Also, I've already limited access from several browsers.
Thanks a lot. Also, sorry for my English.
Share Improve this question edited Jun 10, 2019 at 14:40 Abbas Habibnejad asked Jun 10, 2019 at 14:21 Abbas HabibnejadAbbas Habibnejad 4431 gold badge5 silver badges14 bronze badges1 Answer
Reset to default 2This check can't be implemented on client side of the application.
On the server end, you can get IP address from requested payload. You can store the IP address against the session in In-memory databases like redis or memcache. Now, create an intermediate check at login controller where you can block the user if he/she has logged in more than certain number of IP addresses.
I'm developing a reactjs based application. I want to limit the login from multiple devices at one time to an account. So I need to have an ID that is unique and fixed on device.
I also want the user to stay logged in on one device, so I can not use IP address.
Also, I've already limited access from several browsers.
Thanks a lot. Also, sorry for my English.
I'm developing a reactjs based application. I want to limit the login from multiple devices at one time to an account. So I need to have an ID that is unique and fixed on device.
I also want the user to stay logged in on one device, so I can not use IP address.
Also, I've already limited access from several browsers.
Thanks a lot. Also, sorry for my English.
Share Improve this question edited Jun 10, 2019 at 14:40 Abbas Habibnejad asked Jun 10, 2019 at 14:21 Abbas HabibnejadAbbas Habibnejad 4431 gold badge5 silver badges14 bronze badges1 Answer
Reset to default 2This check can't be implemented on client side of the application.
On the server end, you can get IP address from requested payload. You can store the IP address against the session in In-memory databases like redis or memcache. Now, create an intermediate check at login controller where you can block the user if he/she has logged in more than certain number of IP addresses.
本文标签: javascriptHow to get device id in react js based web applicationStack Overflow
版权声明:本文标题:javascript - How to get device id in react js based web application? - Stack Overflow 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/questions/1745671515a2162484.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论