Page MenuHomePhabricator

Temporary account does not persist across different domains
Open, HighPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  • Go to test.wikipedia.org and make an edit.
  • You get a temporary account.
  • Switch to en.wikisource.org (or any other non-wikipedia production site)

What happens?:

  • The gray bar that indicates the temporary account no longer appears. Attempting to edit this site results in generating a new temporary account.
  • If you go to test2.wikipedia.org or en.wikipedia.org the gray bar appears as expected.

What should have happened instead?:
The temporary account session should be maintained across all temporary-account-enabled wikis on the cluster.

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):

Other information (browser name/version, screenshots, etc.):

  • Browser: Chrome Version 142.0.7444.135
  • Tested on production and beta cluster environments.
  • Tested without incognito modes with cookies enabled.

Event Timeline

I'm recently having an issue that while I'm fully logged as named account in on wikipedia.org wikis, when I go to wikinews or other second level domains, I still need to fully login (with password and 2FA) even though all still go through auth.wikimedia.org. It looks like a deeper level issue that has been introduced recently. Tagging @Tgr who might know more.

What browser did you test in? For Firefox I think this is expected behavior. Temp user creation doesn't involve user interaction on the shared domain so there is no way to access cross-site cookies ("site" in the WHATWG sense, so second-level domain usually).

I'm recently having an issue that while I'm fully logged as named account in on wikipedia.org wikis, when I go to wikinews or other second level domains, I still need to fully login (with password and 2FA) even though all still go through auth.wikimedia.org.

That would be unexpected, since for named accounts the user interaction on auth.wikimedia.org does happen, so in theory the cookies are available in a cross-site context. But it's definitely possible that browser behavior changed or that we broke something. What browser are you using? Does it seem deterministic?

@Tgr I tested in Chrome. I have seen this behavior work before so I was surprised when it didn't. Even after waiting for a few minutes it did not log me in to the temp account.

Chrome in normal mode (not incognito)?

Chrome in normal mode (not incognito)?

Correct, no incognito.
Tested on production and beta cluster environments.

I'm recently having an issue that while I'm fully logged as named account in on wikipedia.org wikis, when I go to wikinews or other second level domains, I still need to fully login (with password and 2FA) even though all still go through auth.wikimedia.org.

That would be unexpected, since for named accounts the user interaction on auth.wikimedia.org does happen, so in theory the cookies are available in a cross-site context. But it's definitely possible that browser behavior changed or that we broke something. What browser are you using? Does it seem deterministic?

Mine was Firefox

I tested this just now on Edge 142, and the temporary account persisted. I got a popup saying I was centrally logged in:

image.png (439×1 px, 127 KB)

(which is weird wording, but okay)

and after refreshing the page I was indeed "logged in" as the temporary account.

So the way we do it still works, in principle, but it depends on the browser behavior regarding third-party cookies. I picked Edge for this test because AFAIK it doesn't attempt any of the privacy mitigations that Firefox and Chrome are trying.

If the browser doesn't permit us to read cookies from subresources on auth.wikimedia.org while visiting en.wikisource.org, the mechanism won't work, and we'd need to do something much more invasive to share the data between the domains.

I'm recently having an issue that while I'm fully logged as named account in on wikipedia.org wikis, when I go to wikinews or other second level domains, I still need to fully login (with password and 2FA) even though all still go through auth.wikimedia.org. It looks like a deeper level issue that has been introduced recently. Tagging @Tgr who might know more.

This sounds like T406589: After authenticating on a content wiki, sometimes have to re-authenticate on authwiki