Centralize anonymous user upgrade and handle upgrade conflicts

Aperta
#734 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 6 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
dart, firebase, flutter

Direzione di ricerca

Start by tracing the anonymous sign-in and provider upgrade flows across Flutter platforms, including the behavior related to #730. Compare how each provider handles linking and where credential-already-in-use is reported. Done means upgrades behave consistently and existing-account conflicts provide enough information for the app to sign in and merge data; the issue names no files or tests.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

auth enhancement oauth
  • Related to #253
  • Related to #730

Problem

Anonymous users are upgraded inconsistently

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:

  • On mobile, most providers link the account; Apple did not until #730.
  • 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.
Lingua principale
Dart
Stelle
152
Fork
144
Merge medio
17h 49m
PR unite (30g)
3

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di firebase/FirebaseUI-Flutter

Tutte le issue di firebase/FirebaseUI-Flutter

Issue simili

Altre issue su Dart

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.