cjx2240 Posted October 21, 2021 Posted October 21, 2021 Hi all A couple of times now I've run into this issue. Last time I think it went away by itself in the end. It's making it very difficult to build a site, every time I refresh or load any page on the front-end. I get logged out of the CMS. I haven't written any code for this site to do with front end logins, logouts, sessions etc.. It happens if my browser's cache is enabled or disabled. I have the following entries in my session log which I think coincide with it User '[username]' - Error: Session fingerprint changed (IP address or useragent) (IP: ::1) I'm not using a VPN I would appreciate any hints or suggestions as this is getting a little frustrating!
DV-JF Posted October 21, 2021 Posted October 21, 2021 Hey @cjx2240 I recognized that this behaviour only occurs when I inspect the website with the dev tools and the "user agent" is changed. To prevent this I added the following entry in the site/config.php file: /** * Prevent from being frequently logged out while using Chrome DevTools * */ $config->sessionFingerprint = 2; Hope this helps you too. To make it save for production you could check if $config->debug is true and wrap this with an if query-. 1 2
cjx2240 Posted October 21, 2021 Author Posted October 21, 2021 Oh for crying out loud... you are right... it only happened when I was using the device toolbar from dev tools in Chrome which evidently affects the user agent. I'm certain this never used to happen, not sure if it's a change in Chrome or the latest version of PW. I'll try out the config setting next time I need it but for now just going back to non-device mode has solved it. Thanks very much!
DV-JF Posted October 21, 2021 Posted October 21, 2021 Wonderful!@cjx2240 Could you please change the title of this post to [SOLVED] ... , makes it easier for others to find this solution ?
Gadgetto Posted May 16, 2023 Posted May 16, 2023 On 10/21/2021 at 12:40 PM, DV-JF said: Hey @cjx2240 I recognized that this behaviour only occurs when I inspect the website with the dev tools and the "user agent" is changed. To prevent this I added the following entry in the site/config.php file: /** * Prevent from being frequently logged out while using Chrome DevTools * */ $config->sessionFingerprint = 2; Hope this helps you too. To make it save for production you could check if $config->debug is true and wrap this with an if query-. Great find!
maetmar Posted May 23, 2023 Posted May 23, 2023 thanks for this! Struggling with this since I started using PW
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now