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
d552549 to
a2d2bc9
Compare
06a6fe9 to
697f1d9
Compare
4785c0e to
5e3a069
Compare
…-state UI to full customization demo (cherry picked from commit 96694e0dddd4dacaa769d09ee153c34d4f51f8a2)
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. (cherry picked from commit 1dfdeda82ecce93f6af54f4dfd6371d108c0ca44)
(cherry picked from commit f05a83c) (cherry picked from commit b9a58843cea3aca0bae6b7f2db69edee76dcf348)
…reation (cherry picked from commit 7e31aa6) (cherry picked from commit 0b6786910543474bde87be08207cce34d0d22782)
…ntState (cherry picked from commit 20681c413ada0394de19203bb2dde2784bac6d06)
5e3a069 to
ba5b475
Compare
ba5b475 to
d389203
Compare
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