Skip to content

fix(auth): make AuthException messages customisable via AuthUIStringProvider#2320

Open
demolaf wants to merge 2 commits into
version-10.0.0-beta03from
exception-translations
Open

fix(auth): make AuthException messages customisable via AuthUIStringProvider#2320
demolaf wants to merge 2 commits into
version-10.0.0-beta03from
exception-translations

Conversation

@demolaf
Copy link
Copy Markdown
Member

@demolaf demolaf commented May 11, 2026

Fixes #1815AuthException messages were hardcoded in English with no
way for apps to customise or translate them.

From strings.xml in consumers app

Screenshot 2026-05-11 at 18 27 09

Expected Behavior

Screenshot_1778520434

@demolaf demolaf marked this pull request as draft May 11, 2026 13:50
@demolaf demolaf changed the base branch from master to version-10.0.0-beta03 May 11, 2026 13:50
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 enables custom error message mapping in AuthException by integrating the AuthUIStringProvider. The changes include updating the AuthException.from factory method to accept a string provider, adding new error message properties to the AuthUIStringProvider interface, and updating various UI screens and providers to pass the context or string provider during exception handling. Feedback focuses on correcting a regression in fallback error messages for disabled users, ensuring consistent precedence where the custom provider overrides SDK messages, and utilizing the local stringProvider in UI screens instead of the context overload to prevent ignoring user-configured custom providers.

Comment thread auth/src/main/java/com/firebase/ui/auth/AuthException.kt Outdated
Comment thread auth/src/main/java/com/firebase/ui/auth/ui/screens/email/EmailAuthScreen.kt Outdated
Comment thread auth/src/main/java/com/firebase/ui/auth/ui/screens/email/EmailAuthScreen.kt Outdated
Comment thread auth/src/main/java/com/firebase/ui/auth/ui/screens/email/EmailAuthScreen.kt Outdated
Comment thread auth/src/main/java/com/firebase/ui/auth/ui/screens/phone/PhoneAuthScreen.kt Outdated
Comment thread auth/src/main/java/com/firebase/ui/auth/AuthException.kt Outdated
@demolaf demolaf marked this pull request as ready for review May 11, 2026 17:16
@demolaf demolaf requested a review from russellwheatley May 12, 2026 08:52
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.

Can't customize 'account disabled' string in auth UI

1 participant