shadimage
Shadcn UI Auth
authformsblockcoresource: ok · refreshed

OIDC Core

A starter policy form: GitHub Actions and Vercel behind a toggle picker, each form with its own submit. The file is yours — add providers, swap the picker, and wire onSubmit to your storage. The builder at the homepage generates this file for any provider combination.

npx shadcn add "https://ui.shadcn.com/oidc/r/core.json"
free

No selection tags yet — empty means no evidence, not lack of support.

Dependencies

Bundle weight · light

Registry dependencies

https://ui.shadcn.com/oidc/r/policy.jsonhttps://ui.shadcn.com/oidc/r/provider-github.jsonhttps://ui.shadcn.com/oidc/r/provider-vercel.jsonhttps://ui.shadcn.com/oidc/r/picker.jsonalert

Files1 · source cached 10/8/2026, 2:41:12 AM

registry/oidc/components/policy-form.tsx
"use client"

import * as React from "react"

import { GithubIcon, GithubPolicyForm } from "@/components/oidc/provider-github"
import { ProviderPicker } from "@/components/oidc/picker"
import { VercelIcon, VercelPolicyForm } from "@/components/oidc/provider-vercel"
import { Alert, AlertTitle } from "@/components/ui/alert"
import type { OidcPolicy } from "@/lib/oidc/policy"

// This file is yours: add or remove providers by editing PROVIDERS and the forms below.
const PROVIDERS = [
  { label: "GitHub Actions", value: "github", icon: GithubIcon },
  { label: "Vercel", value: "vercel", icon: VercelIcon },
]

function OidcPolicyForm() {
  const [provider, setProvider] = React.useState("github")
  const [saved, setSaved] = React.useState(false)

  const onSubmit = (policy: OidcPolicy) => {
    // Replace with your save, e.g. the savePolicy server action.
    console.log(provider, policy)
    setSaved(true)
  }

  return (
    <div className="flex flex-col gap-6">
      <ProviderPicker
        providers={PROVIDERS}
        value={provider}
        onValueChange={setProvider}
      />
      {saved ? (
        <Alert>
          <AlertTitle>Policy saved.</AlertTitle>
        </Alert>
      ) : null}
      {provider === "github" ? <GithubPolicyForm onSubmit={onSubmit} /> : null}
      {provider === "vercel" ? <VercelPolicyForm onSubmit={onSubmit} /> : null}
    </div>
  )
}

export { OidcPolicyForm }

More from Shadcn UI Auth

Browse all components in this library →