cookies – Forced re-login to any Stack Exchange site on Safari after running Apple News

Spread the love

I’m on an old Mac Pro with Safari. Both are now out of date [macOS 10.14 & Safari 14], but this has been happening for years, since both were still current – I’ve just patiently put up with it.

I am not a frequent rebooter, so uptime can often be a month or more. The Mac never sleeps. If I do reboot, Safari auto-reopens in the same state as at quit. Logins & cookies are preserved. I just need to refresh to see each page’s current state.
I keep about 7 SE tabs open permanently – plus many others on questions I’m actively but temporarily involved with. I refresh periodically to see new questions etc.
I can do this as many times as I like with no adverse effect… unless I’ve just quit Apple News. Then I get asked to log in again.

It doesn’t happen if I refresh whilst News is still open, only after I quit it. It also doesn’t seem to happen a second time if I launch News again soon after the last forced login. There seems to be a retention period before the time-out. I’ve been unable to hone this down to an actual time, it may be hours rather than minutes.
As I tend to browse News morning and evening, I generally get logged out twice a day.

Additional tests
If I quit News then refresh immediately, I get the forced login.
If I quit News and wait several minutes, it isn’t triggered.
Browser plugins have been eliminated as a potential issue.
Cookies are established & hold at all other times.

News seems to add a lot of com.Apple.WebKit processes. Safari also uses WebKit. This is about the only connection I can see, I’m not a coder or web dev, so my knowledge is extremely limited in this area.
This issue does not happen with non-WebKit browsers & I cannot reproduce it on any other Mac. Tested back to El Capitan on one Mac & up to Monterey on another. I don’t have a sock-puppet or other means of testing another account on this same Mac.

I first asked this on Meta, wondering if it was some site-specific context server-side. This received little love, so having now found a solution, I’m moving it here just in case this ever affects anyone else.

Author: Dhanraj7978

Leave a Reply

Your email address will not be published. Required fields are marked *