Identity.Base Docs
Sample Apps
The upstream repository includes several sample apps that demonstrate the supported integration shapes. Use them as reference implementations, not as production scaffolding to copy blindly.
| Sample | Purpose | When to use it |
|---|---|---|
| apps/sample-api | Small protected ASP.NET API consuming Identity Base tokens. | You need the simplest resource-server example. |
| apps/sample-client | Minimal React SPA exercising PKCE login against the host. | You want a clean example of browser login without organizations. |
| apps/org-sample-api | Multi-organization sample host using core, roles, admin, and organizations. | You need invitations, active-org scoping, and org role management. |
| apps/org-sample-client | React SPA for registration, org dashboard, invitations, and organization context switching. | You want a real browser-side organizations flow. |
| apps/Samples.AppHost | Aspire host that runs the sample landscape together. | You want the whole sample system booted together locally. |
Best starter combinations
- Basic SPA auth: `Identity.Base.Host` + `apps/sample-client`.
- Protected API: `Identity.Base.Host` + `apps/sample-api` using `Identity.Base.AspNet`.
- Multi-org SaaS: `apps/org-sample-api` + `apps/org-sample-client`.
- Full local playground: `apps/Samples.AppHost`.
Why these samples matter
- The samples show the actual OpenIddict client IDs, redirect URIs, and scope strings used by the upstream project.
- `org-sample-api` demonstrates the package composition most teams eventually need in production.
- `org-sample-client` shows how `X-Organization-Id` and invitation claim flows behave in a real SPA.