registry
@automindzsheets 01–77shadcn 4.x
SHEET 01

SSO Buttons

component / auth

Provider sign-in buttons driven by a config list. Works with better-auth, next-auth or any custom handler.

type
component
files
3
registry deps
button
npm deps
lucide-react

installs

  • components/automindz/provider-icons.tsx
  • lib/automindz/sso-providers.ts
  • components/automindz/sso-buttons.tsx
  • Providers read from lib/automindz/sso-providers.ts
  • Per-provider pending state, no auth library required
  • Stack, grid and icon-only layouts

Edit lib/automindz/sso-providers.ts to enable providers per client, or pass a providers array. Pass onSignIn to call your auth client (better-auth: authClient.signIn.social({ provider }), next-auth: signIn(provider)). Without onSignIn the button navigates to ${signInPath}/${provider} (default /api/auth/signin).

Variations

one state per section

01

Stack, every enabled provider

Press one: it takes the pending state and the others recede, so it stays obvious which provider is working.

fluid

02

Sign-in failure

The failed provider becomes a retry affordance and announces the reason. Nothing else in the stack changes.

fluid

03

Icon-only, two columns

For tight surfaces. The accessible name still carries the provider, so screen readers are unaffected.

fluid

04

Provider paused

Set unavailable in the provider config during an outage or a staged rollout: shown, struck through, explained on hover, not clickable.

fluid