docs(auth): update account-exists guidance after fetchSignInMethodsForEmail removal - #18547
Conversation
…rEmail removal fetchSignInMethodsForEmail() was removed in firebase_auth 6.0.0, but the error-code docs still told users to call it to resolve account-exists-with-different-credential and email-already-in-use. Point them at signing in with an already-linked provider and then linking the original credential instead. Also removes a stray '// ignore: deprecated_member_use_from_same_package' left inside the signInWithCredential doc comment, which had split the sentence mid-clause. Fixes #12909
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. |
Description
FirebaseAuth.fetchSignInMethodsForEmail()was removed infirebase_auth6.0.0 (#17562, for email-enumeration security reasons), but the error-code documentation still instructs users to call it.Existing behavior — the docs for
account-exists-with-different-credentialandemail-already-in-usetell the reader to callfetchSignInMethodsForEmail, sign in with one of the providers it returns, and then link the original credential. That first step is no longer possible from the public API, so the recovery flow as documented cannot be followed.This PR rewrites that guidance to the flow that still works: ask the user to sign in with a provider already linked to the email address, then link the original credential with
linkWithCredential.Two smaller cleanups from the same removal:
firebase_auth.darthad a stray// ignore: deprecated_member_use_from_same_packageleft inside thesignInWithCredentialdoc comment. The deprecated member it suppressed is gone, and it had been dropped in mid-sentence, leavingResolve this by asking the user to sign in using one of the returned providerswith nothing returning them.AuthCredential.signInMethoddescribed itself as "the sign-in method identifier returned infetchSignInMethodsForEmail". That trailing clause is dropped.Six doc sites across three files, all
///comments. No API, behavior, or signature changes.Out of scope:
firebase_auth_web/lib/src/interop/auth_interop.dartstill referencesfirebase.auth.Auth.fetchSignInMethodsForEmail, but that documents the underlying JS SDK method in the interop layer rather than the Dart API, so it is left alone.Related Issues
Fixes #12909
Checklist
///).melos run analyze) does not report any problems on my PR.Breaking Change