On Mar 5, 2021, at 12:52 AM, Sachin Kumar <sachinkumaras@gmail.com> wrote:Hi Experts,Is there any way or logic in Django where we can bind user login id and password with first device login id.for example:-If a user first time login into a PC A, he can't login into PC B using same login id. He can only login into PC A with his login id. if he changes the PC then from backend we can remove his old registration and he can login into New PC.Please help me with the logic or any tutorial on this.
Built-in? I doubt it.
But create a database field in the user record that you'll use to store the IP in. If the field is None, then accept any and all logins. On a successful login, if the field is not None, then only allow a login if it's from the IP address in that field.
Now, ask yourself, why this isn't normal procedure?
Simply because IP Addresses change, and people need to login from multiple devices (eg. Facebook on Desktop computer, Facebook on mobile device, etc).
Instead if you are looking for a more secure method of logging in, look at SQRL - https://github.com/miki725/django-sqrl
And that's "Squirrel" SQRL, designed by Steve gibson of GRC https://www.grc.com/sqrl/sqrl.htm
But I have to Thank you, since I didn't realize that there was a Django SQRL implementation until I just looked. I'm going to look at adding this into my app.
- Benjamin
No comments:
Post a Comment