Skip to content

fix(auth): emit AuthResult on sign-in success and fix MFA tooltip auto-open#2326

Open
demolaf wants to merge 3 commits into
version-10.0.0-beta03from
fix/auth-result-null-mfa-tooltip
Open

fix(auth): emit AuthResult on sign-in success and fix MFA tooltip auto-open#2326
demolaf wants to merge 3 commits into
version-10.0.0-beta03from
fix/auth-result-null-mfa-tooltip

Conversation

@demolaf
Copy link
Copy Markdown
Member

@demolaf demolaf commented May 19, 2026

Closes #2318 .

All providers called updateAuthState(Idle) after sign-in, so the only AuthState.Success came from Firebase's AuthStateListener which never carries an AuthResult. The result?.let guard in FirebaseAuthScreen then silently blocked onSignInSuccess every time.

Fix: emit AuthState.Success with the real AuthResult via a shared updateAuthStateWithResult() helper. Also fixes MFA tooltip auto-opening when disabled.

@demolaf demolaf changed the title fix(auth): update AuthState to reflect success or idle based on user … fix(auth): emit AuthResult on sign-in success and fix MFA tooltip auto-open May 19, 2026
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 refactors the authentication state management to provide more detailed feedback upon successful sign-in. Specifically, it introduces updateAuthStateWithResult in FirebaseAuthUI to transition the state to AuthState.Success (including AuthResult and user details) rather than simply returning to Idle. These changes are propagated across Anonymous, Email, and OAuth providers, with corresponding updates to unit tests. The PR also includes UI adjustments to tooltip visibility. Feedback was provided to revert the USE_AUTH_EMULATOR flag in the demo app to false to ensure it remains functional for users without a local emulator setup.

Comment thread app/src/main/java/com/firebaseui/android/demo/MainActivity.kt Outdated
@demolaf demolaf requested a review from russellwheatley May 19, 2026 11:18
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