GitHub

Getting started

Compose a policy form in the builder, then add it to your app.

Use the builder. Pick identity providers, a form library, and a validation library. Preview the form, open Get Code, and run the command it gives you.

That command installs the composed form, the providers you picked, and any add-ons.

Use the CLI

If you already know what you want, register the registry, then list or search items:

Terminal
npx shadcn@latest registry add @oidc=https://ui.shadcn.com/oidc/r/{name}.json
Terminal
npx shadcn@latest list @oidc
Terminal
npx shadcn@latest search @oidc -q github

Then add the items you chose. core is the default GitHub + Vercel starter form. Prefer the builder for other combinations.

Terminal
npx shadcn@latest add @oidc/core @oidc/verify @oidc/page-actions

Provider item names encode the form library and validation. npx shadcn@latest list @oidc is the source of truth. See Providers.

Render the form

app/page.tsx
import { OidcPolicyForm } from "@/components/oidc/policy-form"

export default function Page() {
  return <OidcPolicyForm />
}

The file is yours. Add providers, swap the picker, and wire onSubmit to your storage.

Save and verify

Submit emits an OidcPolicy. Validate it with validateOidcPolicy on the server before you persist it, then check inbound tokens with verifyOidcToken. With the Page + actions add-on, the generated savePolicy action already runs that validation.

See Save and verify for the policy shape, the onSubmit wiring, and the verifier error codes.

Next steps