I've tried it once by looking at the IP & User Agent. In theory that works but in practice it is a bad idea. Especially the IP check because some users switch IP after 2 minutes they are logged in so your users won't be happy with that.
I don't know. They don't do it with user agent strings and IP's as far as I can see now. Changing my IP or my UA does not seem to log me out. So... hmm maybe in combination with another cookie? Maybe someone else can enlighten us
You doing a copy and paste, however with laravel setup correctly, meaning main laravel not in web folder, the stored sessions are not visible to an outsider, the sessions should be secure.
Of course you can copy and paste your own sessions.
Hi,
Actually, there is a very reliable way to detect session hijacking. It also doesn't give false positives / negatives unlike some of the methods that involve IP addresses and device fingerprints. This method is called "rotating refresh tokens". It basically uses two tokens (access and refresh tokens) which change over time and this changing allows to detect token theft. This method is also suggested in IETF's RFC: https://tools.ietf.org/html/rfc6749#section-10.4