-
In our installation snipe-it whenever I log in one browser, it will always logout all other browser sessions. This is mildly annoying, as for example using a desktop to make changes and a smartphone as QR-Code reader to identify devices. I cannot tell if this is by design, by configuration or by accident. I looked at the source code for a few hours and cannot see anything that should do this on purpose, but with laravel this gets through a few layers of code and I'm a total newbe. The only instance I found on purpose "Auth::logoutOtherDevices" is on passwort change.. which makes a lot of sense, but why does it already auto logout any old session on login? Is this on purpose (which can be turned off?), or is this misconfiguration on our side perhaps? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 7 replies
-
That's definitely not a thing we're doing. There is an env var (I don't know who or how your stuff was set up): https://snipe-it.readme.io/docs/configuration#optional-session-settings |
Beta Was this translation helpful? Give feedback.
Thanks again for the pointers! I found the culprit.
Using
php artisan route:list -vvv --path=admin
I found that after\Illuminate\Auth\Middleware\Authenticate
theIlluminate\Session\Middleware\AuthenticateSession
middleware is run before the application stack.And inside the
handle()
method the following part logs the user out:https://github.com/laravel/framework/blob/11.x/src/Illuminate/Session/Middleware/AuthenticateSession.php#L63-L65
I'm not sure why the password hash changes, though, since the password didn't change. However, after disabling "LDAP Password Sync" it now works and I can login multiple times concurrently!