Server-render social login buttons with provider brand icons - #684
Conversation
📝 WalkthroughWalkthroughAdds inline provider icons to login and account UIs, and preloads enabled auth providers through server-rendered loader data and a client route loader for login and signup routes. ChangesProvider icons and auth provider preloading
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
🔎 Preview deployed: https://kody-pr-684.kody-a99.workers.dev Worker: Mocks:
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 1da1306. Configure here.

The provider buttons on
/loginand/signuppopped in after hydration because the client fetched/auth/providers.jsonon mount. There was no good reason for that: the enabled-provider list is deployment configuration, not per-user data. This PR server-renders the buttons with the rest of the page and adds inline brand SVGs so they are recognizable.Server-rendered buttons
authProvidersis a newAppLoaderDatakey; the login/signup page handler embeds the enabled providers during SSR, so the buttons are in the initial HTML (verified withcurl /login— all three buttons and SVGs present in the document).tryConsumeRouteLoaderData(works during SSR and at hydration), SPA navigations to/login//signupprefetch through a new entry inclientRouteLoaders, and the old client fetch remains only as a fallback when neither source provided data. A failed providers fetch now yields no loader data (instead of masquerading as an empty provider list), so the fallback retries rather than hiding the buttons until a full reload.Brand icons
client/provider-icons.tsxwith inline SVG marks (GitHub octocat, multicolor Google G, X logo) sized inemso they scale with the button text and inheritcurrentColorwhere appropriate./accountConnected accounts card (connected rows and Connect buttons).Also merges
origin/main(resolving the routes-index conflict with the onboarding page) and fixes two pre-existing formatting drifts onmainthatformat:checkflags (d1-retry.ts,sentry-options.ts).System recap — composes existing primitives (low risk)
Mode: recap · Base:
main@ecfeed79· Head:ddf2f919Classification: composes — wires the existing SSR loader-data mechanism to the existing social-login provider list and adds presentational SVG icons; no primitive contracts change.
Primitives touched
app-uiapp-sessionsgetEnabledOauthProviders)System map
Summary by CodeRabbit