Repository navigation
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
5e3a069 to
ba5b475
Compare
875cf50 to
1c0c935
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)
…ntState (cherry picked from commit 20681c413ada0394de19203bb2dde2784bac6d06)
… full-customization email flow
…ng helpers out of MainActivity
ddbbd42 to
4ee4f80
Compare
…he continue URL builder preserves one
…pressing IconDensities
russellwheatley
left a comment
There was a problem hiding this comment.
LGTM. Two small non-blocking things worth a look:
MainActivity.USE_AUTH_EMULATORflips fromtruetofalse— unrelated to this PR's scope, might be intentional but flagging in case it's a leftover from local testing.PhoneEntryStep's CTA reads "Sign Up" but the screen is the general phone sign-in entry (title says "Login by phone number"); looks copy-pasted from the email entry step's create-account button.
… for what it does
* wip: demo (cherry picked from commit d88088103e61630c95f69de273953346b90486ab) * sample(auth): add MFA enrollment/challenge, reauth, and authenticated-state UI to full customization demo (cherry picked from commit 96694e0dddd4dacaa769d09ee153c34d4f51f8a2) * fix(sample): address review feedback on full customization demo 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) * sample(auth): drop recovery codes screen following its removal from MFA enrollment * sample(auth): label the two-factor CTA from the user's enrolled factors * sample(auth): migrate full customization reauth screen to ReauthContentState (cherry picked from commit 20681c413ada0394de19203bb2dde2784bac6d06) * sample(auth): render the demo's own email UI for library-initiated email flows * sample(auth): ask sign in or create account instead of probing for the account * sample(auth): carry the typed email into the next step and ungate create account * sample(auth): host the primary email flow on its own per-mode Navigation 3 back stack * sample(auth): match the swipe-back animation to the tapped one in the full-customization email flow * sample(auth): give reauthentication its own email step in the full-customization demo * sample(auth): route a returning email link to the demo that sent it * sample(auth): treat a declined reauthentication as a cancellation, not a failure * sample(auth): trim the demo's inline comments to one line each * sample(auth): let each demo own its email link tag and move the routing helpers out of MainActivity * sample(auth): drop the stale ContinueUrlBuilder rationale from the email link routing * sample(auth): tag the email link origin with a query param now that the continue URL builder preserves one * sample(auth): convert the full customization art to webp and stop lint failing on it * sample(auth): file the full customization art as nodpi instead of suppressing IconDensities * sample(auth): restore the emulator flag and label the phone entry CTA for what it does
Extends the full customization demo to supply a custom UI for every
FirebaseAuthScreencontent slot.Changes
Preview
1-signin-signup-phone.mp4
2-email-link-signin.mp4
5-reauth.mp4
3-authenticated-mfa-enrollment.mp4
4-mfa-challenge.mp4