fix(auth): build auth exceptions with the configured string provider - #2508
Open
demolaf wants to merge 2 commits into
Open
fix(auth): build auth exceptions with the configured string provider#2508demolaf wants to merge 2 commits into
demolaf wants to merge 2 commits into
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request refactors error message resolution to consistently honor the host's configured AuthUIStringProvider and locale. It updates TopLevelDialogController to resolve strings from LocalAuthUIStringProvider at render time, deprecates explicit provider arguments, and adds comprehensive unit tests for localized error routing across all auth providers. A critical stale lambda capture bug was identified in rememberTopLevelDialogController where the unkeyed remember block caches the initial authState lambda, preventing the controller from receiving updated state in production. It is recommended to use rememberUpdatedState to resolve this issue.
demolaf
marked this pull request as ready for review
September 11, 2026 15:26
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.
Auth error messages were built at throw time from a string provider that was never the one the host configured. Every call site in the provider extensions either passed a bare
Context, which resolves against the device locale, or passed nothing and fell through to the raw Firebase SDK string, which is what #2506 hit on the phone path. The correct provider was already in scope at all 21 sites asconfig.stringProvider.Routing it through made the top-level dialog controller churn on every recomposition for hosts that build their configuration inline, losing dialogs that had just been shown, so
TopLevelDialogControllerno longer holds a provider and readsLocalAuthUIStringProviderat render time. Its previous constructor and factory are kept as deprecated overloads.Added routing tests for the converted sites and a dialog-lifetime regression test, each verified to fail on the old code.