Skip to content

feat(auth): implement legacyFetchSignInWithEmail configuration option#2316

Open
russellwheatley wants to merge 7 commits intoversion-10.0.0-beta03from
fetchSigninWithEmail
Open

feat(auth): implement legacyFetchSignInWithEmail configuration option#2316
russellwheatley wants to merge 7 commits intoversion-10.0.0-beta03from
fetchSigninWithEmail

Conversation

@russellwheatley
Copy link
Copy Markdown
Member

@russellwheatley russellwheatley commented Apr 20, 2026

  • Adds legacyFetchSignInWithEmail to AuthUIConfiguration, defaulting to false.
  • Opts into legacy fetchSignInMethodsForEmail() recovery only for projects that have email enumeration protection disabled.
  • Improves the email/password sign-in flow when a user tries the wrong auth method for an existing account.
  • Detects when an email/password attempt should use a different configured provider instead of password sign-in.
  • Surfaces provider-aware recovery actions from the email error dialog, including direct continuation to Google/Facebook/etc. or email-link sign-in when applicable.
  • Preserves existing behavior by default when the new flag is not enabled.
  • Adds focused unit test coverage for configuration defaults and legacy provider-recovery behavior.
  • Fixes top-level error dialog recovery handling so custom recovery actions do not override normal retry behavior.
  • helper script to run demo app from command line.

Screen recording shows my attempt at trying to sign-in with Github when I have an account with email provider only:

Screen_recording_20260420_132518.webm

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request implements a legacy recovery path for email sign-in, intended for use when email enumeration protection is disabled. It introduces the DifferentSignInMethodRequiredException and a legacyFetchSignInWithEmail configuration flag. The core logic uses the legacy fetchSignInMethodsForEmail API to suggest alternative providers when a user attempts to sign in with an incorrect method. The UI layer, including ErrorRecoveryDialog and various screens, has been updated to handle this recovery flow. Review feedback highlights a missing recovery case in the top-level FirebaseAuthScreen, a redundant check in the recovery logic, and the need to support generic OAuth providers in the provider redirection callback.

Comment thread auth/src/main/java/com/firebase/ui/auth/ui/screens/FirebaseAuthScreen.kt Outdated
@russellwheatley russellwheatley marked this pull request as ready for review April 20, 2026 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant