You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Centralize anonymous user upgrade and handle upgrade conflicts #734
When a user who signed in anonymously then signs in with a provider, FirebaseUI should link the provider to the anonymous account so their uid and data are kept. Whether that happens currently depends on the provider and platform:
Email/password only links on sign-up. Email link only links when upgradeAnonymousUsers is enabled.
On web, OAuth providers (Google, Apple, etc.) sign in as a new user instead of linking, so the anonymous user's data is lost. Phone sign-in on web links even when the signed in user is not anonymous.
Returning users can get stuck
If an anonymous user signs in with a provider account that already belongs to another user (for example, a returning user on a new device), linking fails with credential-already-in-use and the sign-in screen shows an error. The user cannot sign in with that provider while signed in anonymously, and the app has no way to recover the sign-in or merge the anonymous user's data.
Expected behaviour
Upgrading anonymous users behaves the same for every provider and platform.
When the account already exists, the app is given what it needs to sign the user in and merge the anonymous user's data, instead of a dead-end error.
Activity