Skip to content

fix(auth): expose slot parameters through FirebaseAuthScreen#2328

Open
demolaf wants to merge 4 commits into
version-10.0.0-beta03from
fix/auth-screen-custom-slots
Open

fix(auth): expose slot parameters through FirebaseAuthScreen#2328
demolaf wants to merge 4 commits into
version-10.0.0-beta03from
fix/auth-screen-custom-slots

Conversation

@demolaf
Copy link
Copy Markdown
Member

@demolaf demolaf commented May 20, 2026

Closes #2327 .

FirebaseAuthScreen accepted customization slots on sub-screens (custom method picker layout, email/phone/MFA content) but never forwarded them, making them unreachable from the high-level API. This adds the missing parameters and wires them through.

Also refactors the demo app's Custom Slots & Theming screen into separate activities, adds a SpotlightMethodPicker demo for customMethodPickerLayout, and adds unit tests verifying each slot is forwarded correctly.

Configurable params

@Composable
fun FirebaseAuthScreen(
    configuration: AuthUIConfiguration,
    onSignInSuccess: (AuthResult) -> Unit,
    onSignInFailure: (AuthException) -> Unit,
    onSignInCancelled: () -> Unit,
    modifier: Modifier = Modifier,
    authUI: FirebaseAuthUI = FirebaseAuthUI.getInstance(),
    emailLink: String? = null,
    mfaConfiguration: MfaConfiguration = MfaConfiguration(),
    authenticatedContent: (@Composable (state: AuthState, uiContext: AuthSuccessUiContext) -> Unit)? = null,

    // New
    customMethodPickerLayout: (@Composable (List<AuthProvider>, (AuthProvider) -> Unit) -> Unit)? = null,
    emailContent: (@Composable (EmailAuthContentState) -> Unit)? = null,
    phoneContent: (@Composable (PhoneAuthContentState) -> Unit)? = null,
    mfaEnrollmentContent: (@Composable (MfaEnrollmentContentState) -> Unit)? = null,
    mfaChallengeContent: (@Composable (MfaChallengeContentState) -> Unit)? = null,
) {

}

Expected behavior

custom-slots-fix.mp4

demolaf added 2 commits May 20, 2026 16:22
- AuthMethodPicker
- EmailAuth
- PhoneAuth
- MFA Enrollment & Challenge
@demolaf demolaf marked this pull request as draft May 20, 2026 15:30
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 introduces comprehensive UI customization capabilities to FirebaseAuthScreen by adding slot parameters for email, phone, MFA enrollment, and MFA challenge screens, as well as a custom method picker layout. The demo application has been refactored into separate activities to showcase these new features, including custom method pickers and shape customization. Review feedback suggests optimizing provider categorization using groupBy in the demo, ensuring CircularProgressIndicator uses Modifier.size() to prevent stretching and visual jumps, and reordering function parameters in AuthMethodPicker to place the lambda at the end for better Kotlin idiomaticity.

Comment thread app/src/main/java/com/firebaseui/android/demo/CustomMethodPickerDemoActivity.kt Outdated
Comment thread app/src/main/java/com/firebaseui/android/demo/EmailAuthSlotDemoActivity.kt Outdated
Comment thread app/src/main/java/com/firebaseui/android/demo/EmailAuthSlotDemoActivity.kt Outdated
Comment thread app/src/main/java/com/firebaseui/android/demo/EmailAuthSlotDemoActivity.kt Outdated
Comment thread app/src/main/java/com/firebaseui/android/demo/PhoneAuthSlotDemoActivity.kt Outdated
Comment thread app/src/main/java/com/firebaseui/android/demo/PhoneAuthSlotDemoActivity.kt Outdated
@demolaf demolaf linked an issue May 20, 2026 that may be closed by this pull request
@demolaf demolaf changed the title Fix/auth screen custom slots fix(auth): expose slot parameters through FirebaseAuthScreen May 20, 2026
@demolaf demolaf marked this pull request as ready for review May 21, 2026 08:41
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.

[Auth-UI] [v10.0.0-beta02] AuthMethodPicker customLayout use

1 participant