fix(auth): emit AuthResult on sign-in success and fix MFA tooltip auto-open#2326
Open
demolaf wants to merge 3 commits into
Open
fix(auth): emit AuthResult on sign-in success and fix MFA tooltip auto-open#2326demolaf wants to merge 3 commits into
demolaf wants to merge 3 commits into
Conversation
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #2318 .
All providers called
updateAuthState(Idle)after sign-in, so the onlyAuthState.Successcame from Firebase'sAuthStateListenerwhich never carries anAuthResult. Theresult?.letguard inFirebaseAuthScreenthen silently blockedonSignInSuccessevery time.Fix: emit
AuthState.Successwith the realAuthResultvia a sharedupdateAuthStateWithResult()helper. Also fixes MFA tooltip auto-opening when disabled.