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
- Research the platform's token format: issuer, default audience, identifying claims, stable IDs, and platform-specific quirks.
- Create
registry/oidc/providers/<name>.source.ts. Copygoogle.source.tsfor a simple provider, orgithub.source.tsif you need selects or conditional fields. - Generate and typecheck:
pnpm generate <name>
pnpm typecheck- Add round-trip and rejection tests to
tests/providers.test.ts, then runpnpm test. - Add the provider icon to the
ICONSrecord incomponents/builder/data.ts. - Build the registry with
pnpm registry:build. - Run
pnpm devand 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
- Add the field to
spec.fieldsand to alayoutrow. Use one field per row. - Update
compileto emit the claim andparseto recover the value. - If needed, add the field to the source-only
Fieldstype. - Regenerate, typecheck, and update round-trip tests.
See CONTRIBUTING.md for the full FieldSpec reference and flavor generator notes.