A signed-in user with no account on another region

A user can be signed in and still land with no account on the copy of your app they just reached, because their sign-in identity carries across regions while their account is a row in that copy's own database. The page then shows an empty account — zero balance, no keys, no projects — and "sign in again" sends the user in a circle, because they already are.

What it looks like

Two different things called "signed in"

The sign-in session and the account are kept in different places, and only one of them travels.

The sign-in identity belongs to the provider. Single sign-on is what lets one login carry across applications: Auth0 defines it as occurring "when a user logs in to one application and is then signed in to other applications automatically" (Auth0: Single Sign-On, checked 2026-11-11). For the second address to take part, the provider must allow it — Auth0's allowed callback URLs are the "set of URLs to which Auth0 is allowed to redirect users after they authenticate" (Auth0: Application Settings, checked 2026-11-11).

The account belongs to your app's database. It is a row keyed by the provider's user identifier. OpenID Connect defines that identifier as a "locally unique and never reassigned identifier within the Issuer for the End-User" (OpenID Connect Core 1.0, section 8, checked 2026-11-11). It is the same user on every region, but signing in does not write a row into a database that has never seen them.

The browser's own storage does not cross either. "Access to data stored in the browser such as Web Storage and IndexedDB are separated by origin", and "each origin gets its own separate storage" (MDN: Same-origin policy, checked 2026-11-11). Two addresses are two origins unless protocol, host and port all match, so a token or cached profile saved at the first address is not visible at the second.

If each copy of the app has its own database, the account row exists only where it was written. A shared database or replication can move rows; neither can invent a row that was never written anywhere.

Why the account is missing instead of created

Apps usually create the account at one of two moments: a signup form, or the first authenticated request. A user sent to another region did not go through signup there, so it falls to the first authenticated request — which is often a read.

A read endpoint should not create anything. RFC 9110 defines a method as safe when "the client does not request, and does not expect, any state change on the origin server" (RFC 9110, section 9.2.1, checked 2026-11-11). A dashboard's GET /account belongs in that group, and it is also what the page refreshes to stay current: if it created rows, every refresh would be a write.

So the request answers truthfully with nothing — account: null, an empty list — and the page renders an empty account. Signing in again produces the same session and the same missing row.

How to fix it: create on first touch

Add an operation whose job is "make sure this identity has an account", and call it once when a signed-in page first loads:

Two tabs arriving at once are what catches a read-then-insert without a constraint: both reads find nothing and both insert. Either hold a lock around the insert, or let the database reject the second and return the existing row.

Check that it is fixed

See also

Glossary terms used on this page: Host, Logs, Prompt, Provider, Token.

Sources

All checked on 2026-11-11.


First version written with AI assistance from a datacenter switch that left a signed-in user with an empty account, and checked against the sources on 2026-11-11. Found a mistake? Fix it or open an issue. Text licensed under CC BY 4.0.