The Old Man Posted January 25 Posted January 25 (edited) My members can't seem to stay logged in to my community. I tried and I can log into a forum topic okay, but when I click on the logo to go to the community homepage or view another page I get logged out again however, the cookies haven't changed in the devtools storage view, they are still present. I'm using Cloudflare and have the mod_remoteip Apache module configured as per https://developers.cloudflare.com/support/troubleshooting/restoring-visitor-ips/restoring-original-visitor-ips/#mod_remoteip I checked my constants file configuration and the domain was set with a . period so I've just removed that, as I have had better success using IPS with Cloudflare page caching in the past without adding the period in front of the domain name. This worked but after a view page views I'm logged out again! Please can you confirm the correct settings for the settings "Trust IP address provided by proxies?" and "Check IP address when validating session?" in AdminCP when using Cloudflare? Many thanks. Edited January 25 by The Old Man
The Old Man Posted January 25 Author Posted January 25 I logged into AdminCP, upgraded to latest version from previous, and tried logging in on the front end again but got: "Oops! The CSRF protection key did not match. This may indicate a plugin or theme is out of date. Please contact technical support for more information."
Jim M Posted January 25 Posted January 25 Wouldn't think this is a cookie issue but an IP validation issue. Likely your user's IP addresses are not being rendered correctly and you're getting CloudFlare's IP addresses somehow. If you're using mod_remoteip and it is correctly relaying this data as the source IP of the user, there is no need to have enabled the "Trust IP address provided by proxies" The Old Man 1
The Old Man Posted January 25 Author Posted January 25 Okay thanks, Jim. I will try again with "Trust IP" disabled.
The Old Man Posted January 25 Author Posted January 25 Update: That seems to have worked. Whilst still logged into AdminCP, I disabled Trust IP and saved the settings. Then cleared the Cloudflare cache via my iPad. As soon as I did, I was suddenly logged back in the front end without logging in, and the pages are loading fine as I navigate through the site. Still using your Cloudflare rules by the way. So this seems to work:
The Old Man Posted January 25 Author Posted January 25 Sadly it’s still playing up for me this time on my iPad, I get an error when logging in to the front end via the front forum index page but it lets me log in okay to AdminCP. It wouldn’t let me change to default IPS theme, just reloaded my own theme, but when I navigate to another page I see the default IPS theme. Just can’t seem to win with IPS and Cloudflare these days. Come back Redis page caching, all in forgiven.
Marc Posted January 26 Posted January 26 Unfortunately, while some use cloudflare with success, we do see many many many issues when people use it
Recommended Posts