Repository navigation
Conversation
…Content Add DefaultAuthPickerContent(authMethodPicker:), which hands the layout an AuthMethodPickerState with the registered providers, a select action that routes MFA, account conflicts and errors like the default buttons, and the email-link state and action. Add AuthService.registeredProviders and triggerSignIn(for:), plus the opt-in AuthProviderAction protocol for providers whose sign-in yields no credential; PhoneAuthProviderAuthUI adopts it. Providers that support neither path report an error instead of doing nothing. Move the 14% horizontal inset into DefaultAuthMethodPicker so custom layouts are not padded.
demolaf
added this pull request to stack #1404
October 20, 2026 11:30
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces the AuthProviderAction protocol and updates AuthService to support programmatic sign-in for custom providers. It also refactors DefaultAuthPickerContent to allow custom layouts for provider buttons via AuthMethodPickerState and adds comprehensive unit tests. The review feedback suggests improving code readability and efficiency by avoiding unidiomatic try await .success(...) syntax and removing redundant VStack wrappers in SwiftUI views.
demolaf
marked this pull request as ready for review
October 20, 2026 13:54
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
DefaultAuthPickerContent(authMethodPicker:)so apps can lay out the provider buttons themselves, with the same MFA, account-conflict and error handling as the default buttons. Stacked on #1403.Changes
AuthMethodPickerState:providers,select(_:),isEmailLinkEnabledandselectEmailLink(), so a custom layout can't silently drop email-link sign-in. Its public init lets apps preview layouts with stub actions.AuthServicegainsregisteredProvidersandtriggerSignIn(for:). The new opt-inAuthProviderActioncovers providers with no credential and takes precedence when adopted;PhoneAuthProviderAuthUIadopts it.select(_:)reports an error for a provider that is neither credential-based norAuthProviderAction, instead of doing nothing.DefaultAuthMethodPicker, so custom layouts aren't padded. The default screen is pixel-identical tomain.API Usage
Maintainer note: Fixes internal CPRN-517