My old computer broke down a few days ago, so I'm using a laptop until I can get it fixed. As a side effect, I no longer have my usual browser cookies, so I had to log back into Stack Exchange.
While doing so, I noticed that I kept having to log in to every Stack Exchange site I visited — the usual "Welcome back [username], you've been logged in." auto-login banner seemed to be conspicuously missing. In fact, a quick look at the "network" tab in the developer tools suggested that no requests to stackauth.com
were being made at all.
Eventually, I decided to dive into the code. Turns out that the code to make the global auth check and bring up the banner is simply:
gauth.checkStackAuth(StackExchange.options.stackAuthUrl);
And, what do you know, running that command from the developer console does auto-log me in. However, the reason this code isn't being run automatically is because it's disabled in the site config (apparently for all SE sites). For example, the page I'm typing this question on has the following config options set:
StackExchange.init( {
"locale": "en",
"stackAuthUrl": "https://stackauth.com",
"serverTime": 1408393334,
"networkMetaHostname": "meta.stackexchange.com",
"styleCode": true,
"enableUserHovercards": true,
"site": {
"name": "Meta Stack Exchange",
"description": "Q&A for meta-discussion of the Stack Exchange family of Q&A websites",
"isNoticesTabEnabled": true,
"recaptchaPublicKey": "6LdsB7sSAAAAAAzjgEF_Hd8vXv-C42sa_KyofaGR",
"recaptchaAudioLang": "en",
"enableNewTagCreationWarning": false,
"globalAuthDisabled": true, // <--- HERE
"isMetaSite": true,
"enableSocialMediaInSharePopup": true,
"useGoogleOAuth2": true
},
// etc.
So, apparently, global auto-login has been deliberately disabled for some reason. Why is that, and is there any planned timeline for re-enabling it?
!
.[Error] Blocked a frame with origin "https://stackauth.com" from accessing a frame with origin "http://diy.stackexchange.com". The frame requesting access has a protocol of "https", the frame being accessed has a protocol of "http". Protocols must match.