GitHub

Contributing

Add a provider or field to the OIDC UI registry.

Provider components are generated. Write each provider once in registry/oidc/providers/<name>.source.ts. Running pnpm generate creates nine versions of that provider, one for each form and validation library combination.

Do not edit registry/oidc/components/provider-*.tsx or anything in registry/oidc/flavors/ — those are generated, your changes will be overwritten, and pnpm check:generated will fail. registry/oidc/components/policy-form.tsx and claims.tsx are hand-authored.

Add a provider

  1. Research the platform's token format: issuer, default audience, identifying claims, stable IDs, and platform-specific quirks.
  2. Create registry/oidc/providers/<name>.source.ts. Copy google.source.ts for a simple provider, or github.source.ts if you need selects or conditional fields.
  3. Generate and typecheck:
Terminal
pnpm generate <name>
pnpm typecheck
  1. Add round-trip and rejection tests to tests/providers.test.ts, then run pnpm test.
  2. Add the provider icon to the ICONS record in components/builder/data.ts.
  3. Build the registry with pnpm registry:build.
  4. Run pnpm dev and confirm the form renders in Preview, generated files appear in Code, and the install command resolves.

Policy logic

compile turns form values into an OIDC policy. It must only produce valid policies:

  • Derive fixed issuers and audiences instead of accepting them as free text
  • Add required prefixes to refs
  • Wrap UUIDs where the platform requires it

parse turns a policy back into form values. Return null whenever the form cannot fully represent the policy, including policies for other providers. Each provider needs a recognizable signature so parsers do not overlap.

Keep the logic:start / logic:end region framework-independent: no React.

Add a field

  1. Add the field to spec.fields and to a layout row. Use one field per row.
  2. Update compile to emit the claim and parse to recover the value.
  3. If needed, add the field to the source-only Fields type.
  4. Regenerate, typecheck, and update round-trip tests.

See CONTRIBUTING.md for the full FieldSpec reference and flavor generator notes.