feat: drive SSO button visibility from server auth config#62
Merged
Conversation
Instead of hardcoding Google/Apple buttons, fetch enabled social providers from the server's /api/v1/auth/config endpoint on connect and hydrate. The sign-in and sign-up screens now render only the providers the server reports, filtered by platform support (e.g. Apple only on iOS). Unknown providers fall back to a generic label. https://claude.ai/code/session_014dJB1cy241fXfHdxg8MZbw
Cover fetchServerAuthConfig (all success and error branches) and the server store's hydrate/connect/reset actions including the new ssoProviders field. This fixes the ./stores/ coverage threshold that was failing because server-store.ts had no tests. https://claude.ai/code/session_014dJB1cy241fXfHdxg8MZbw
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.
$(cat <<'EOF'
Summary
/api/v1/auth/configresponse instead of being hardcodedlib/server-auth-config.tswith a typedfetchServerAuthConfig()function that fetches{ socialProviders: string[] }from the serverstores/server-store.tsto fetch and storessoProviderson bothhydrate(app start) andconnect(server config screen)Continue with <id>labelssoProviders: ["google"]from the server storeTest plan
{ "socialProviders": ["google"] }from/api/v1/auth/config— only the Google button appears{ "socialProviders": ["google", "apple"] }— both buttons appear on iOS, only Google on Android{ "socialProviders": [] }or whose endpoint returns non-OK — no SSO section renders at alljest __tests__/e2e/auth-flow.e2e.test.tsx)https://claude.ai/code/session_014dJB1cy241fXfHdxg8MZbw
EOF
)
Generated by Claude Code