Repository navigation
feat: sign in with Google and GitHub from the hosted card - #102
Merged
Merged
Conversation
joshpanka
marked this pull request as ready for review
October 16, 2026 15:39
Continue with Google and Continue with GitHub above the password form in both modes, each a navigation to the identity service's start hop carrying the in-flight authorize; which providers show is NEXT_PUBLIC_AUTH_PROVIDERS (the hosted build names both). The identity service's refusal codes render as the banner at the top of the card, the provider named and its email settings linked inside the sentence when the fix lives there.
joshpanka
force-pushed
the
feat/provider-buttons
branch
from
October 16, 2026 16:39
15ba3ad to
0fc60ab
Compare
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.
What
The hosted login and sign-up card offers "Continue with Google" and "Continue with GitHub" above the password form, the shape the password form keeps (visible, not disclosed). The identity service owns the round trip (its own PR); the card only starts it and shows the outcome.
@bower/api:AuthProvider, theAUTH_PROVIDERSroster (label per provider),parseAuthProviders/authProviders()readingNEXT_PUBLIC_AUTH_PROVIDERS(a comma list inlined at build time like the origins; unknown names dropped, order kept, once each),providerStartUrl(provider, next)on the newauthRoutes.socialStart(/social/<provider>/start, at the identity service's root like its other navigation targets), carrying the in-flight authorize so the identity service resumes it.@bower/ui:GoogleMarkandGitHubMark, inline SVGs like the brand mark (lucide ships neither).(auth)/_components/provider-buttons.tsx: one full-width outline button per configured provider, each a full navigation to the identity service's start endpoint, then an "or" divider.CredentialsFormrenders it above the form in both modes; the fallback skeleton reads the same provider list, so it cannot drift. With no provider configured the card is unchanged.(auth)/_components/provider-errors.ts: the identity service's?auth_error=codes as one line each (account_exists,email_unverified,state_mismatch,provider_unavailable,provider_cancelled,provider_failed,rate_limited,account_inactive, a generic line for an unknown code), rendered as a banner at the top of the card, above the provider buttons the attempt came through (the form's own errors keep their slot inside the form). When the fix lives elsewhere the sentence's own verb is the link, so the banner stays one element in one color:email_unverifiedreads " hasn't verified your primary email. Verify it with , then try again." with the verb linking to that provider's email settings (GitHub's or Google's), the provider taken from the&provider=the identity service adds to its redirect, since either provider can report an unverified address; without it the line stays generic.ErrorMessagetakes aReactNodemessage for that. The login page reads the code on the server; the first submit replaces the arrival line with the form's own outcome..env.productionsetsgoogle,githubfor the hosted worker; the dev compose passesNEXT_PUBLIC_AUTH_PROVIDERSthrough from the root.env(empty by default, documented in.env.examplebeside the local-hub block); the web image takes it as a build argument defaulting to none, since only an identity service holding provider credentials can honor a button.Verification
pnpm -r lint,typecheck,testpass (the api package's 35: provider parsing for empty, one, both, an unknown dropped, a duplicate once; the start URL with and withoutnext).NEXT_PUBLIC_AUTH_PROVIDERSunset, login and sign-up render no button and no divider; withgoogle,github, both pages render the two buttons before the divider before the form, each linking tohttp://localhost:8001/social/<provider>/start?next=<the authorize>;/login?auth_error=account_existspaints "An account with this email already exists. Sign in with your password." and an unknown code the generic line; the self-host page still shows its one button./login?auth_error=provider_unavailable&next=...and the card shows "That way of signing in isn't available here." with the form beneath.