04-30-2023, 03:40 AM
(04-25-2023, 11:16 AM)Сергей Александрович Wrote: Find out the ID of the device on which the client is running?
Situation :
When the client is working with the application, he left the program for a short time and must re-enter the username and password when re-logging in.
The idea:
To remember the ID of the device on which the client is working and, if the device ID has not changed when re-logging in, restore authorization without a LOGIN-PASSWORD request
Question: How do I find out the ID of the device on which the client is running?
Almost impossible to ID a physical machine. I've needed to do that in the past and used cookies.
ID the "machine" by laying down a unique cookie, then you can check for that ID cookie in the future. If you need to tie it to a physical machine, create an authorization process to run on that machine to create the cookie initially, then don't allow update/change. Obviously you'll need to encrypt the cookie contents, but it will work. SORT OF work. The problem is that each browser on a machine has its own "cookie space', so there is a "machine" per browser.
Oh, and it is a cookie. So can be fragile if cookies get nuked. Not foolproof, but useful.
Dan

