I think I finally fixed it, so here's the solution (at least in my case) if anyone needs it later on..
- Cause : HTTPS via Cloudflare
- Explanation : Activating SSL via cloudflare makes it that both http:// and https:// are working
- Solution : Force stay logged-in with
@AndyB 's add-on + Force https via htaccess (code bellow).
So basically, even though I put https:// in every possible place in ACP and templates, if user typed in the http:// url it would also work, and at some point he'll click an https:// link and might be unlogged, for some reason this was accentuated on mobile.
So I wanted to force all visits to https:// , searched for the code to put in the .htaccess file, which seemed rather straight forward, but was causing either an infinite loop to https:// or css to not be loaded ..
Issue was caused by Cloudflare, first I added the line suggested by
@Mike and that you can find here :
https://support.cloudflare.com/hc/e...o-I-restore-original-visitor-IP-with-XenForo-
And after hours and hours of searching, I finally found a stackoverflow comment that was mentionning cloudflare causing issue with the generic RewriteRule, and the correct ones to use :
Code:
# If we receive a forwarded http request from a proxy...
RewriteCond %{HTTP:X-Forwarded-Proto} =http [OR]
# ...or just a plain old http request directly from the client
RewriteCond %{HTTP:X-Forwarded-Proto} =""
RewriteCond %{HTTPS} !=on
# Redirect to https version
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
I tested extensively, on both chrome and safari mobile, even closing the apps entirely and relaunching them (which until this fix meant being logged out 100% of the times), and couldn't get it to unlog, so as of right now I consider it fixed (youppiii) .. will update if something happens
Mehdi