sample(auth): full customization demo - #2414
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a fully customized authentication flow demo (FullCustomizationDemoActivity and associated steps) to showcase the capabilities of customMethodPickerLayout in FirebaseAuthScreen, alongside minor inset adjustments in the default auth screens. The review feedback is highly constructive and should be addressed: it recommends implementing a BackHandler for proper step-back navigation, making the alternative sign-in methods sheet scrollable to prevent clipping on smaller screens, passing the FirebaseAuth instance dynamically to support custom configurations, performing case-insensitive and trimmed email validation, and ensuring the loading indicator in CtaButton has sufficient contrast.
0cdfacd to
1778d6c
Compare
e98fb6e to
cbbd262
Compare
ccd214c to
267731e
Compare
267731e to
e035a60
Compare
74c0370 to
007676d
Compare
dbaac07 to
f896825
Compare
…-state UI to full customization demo
d552549 to
a2d2bc9
Compare
Intercept back on the login/sign-up steps so it returns to email entry instead of leaving the auth flow, make the other-sign-in-methods sheet scrollable (nine providers plus the ToS footer overflow shorter screens), compare the confirmation email trimmed and case-insensitively and give the field an email keyboard, and take the configured FirebaseAuth instance rather than reaching for the global default.
Extends the full customization demo to the remaining
FirebaseAuthScreenslots, so the sample now supplies a custom UI for every one:mfaEnrollmentContent(all five enrollment steps),mfaChallengeContent,reauthContentandauthenticatedContent.The authenticated screen mostly exists to make the other two reachable — "Set up two-factor" navigates into enrollment, and changing the password runs through
authUI.withReauth, which is what provokes the reauth slot.common/AuthPage.kt: shared page frame (mascot, headline, card, bottom actions) for the new screens, so their background, scrolling and inset behaviour match the existing email and phone steps.screens/reauth/ReauthUI.kthandles password reauthentication only, with an explicit fallback for accounts that have no password provider — the federated path the default reauth sheet uses isinternal/private, so it isn't expressible from a custom slot.Preview
full-customization-flow.webm
other-sign-in-methods.webm