Skip to Content
TAdminOAuth2 / OIDC integration

OAuth2 / OIDC integration

On this page

External identity settings are persisted per administration realm: providers, login policies, public origins and account linking.

Host options

{ "ExternalIdentityHostOptions": { "AllowedRealms": ["global"], "FrontendCallbackPath": "/external-callback" } }

The host declares allowed identity realms. Configure the browser’s actual controlled origin in realm settings. Let the backend generate provider callbacks instead of guessing their URLs in the frontend.

The standalone sample uses http://127.0.0.1:6200; Vite development uses http://127.0.0.1:5174. Non-development publication requires HTTPS by default.

Provider lifecycle

Save provider configuration, check connectivity, test login, then publish. SaveExternalProvider carries version. Secret operations are Keep (retain), Replace (requires a nonblank secret) and Clear (remove).

Policies include PasswordOnly, Mixed and SsoOnly, with an optional default provider, automatic redirect and recovery users. The sample exposes /login?local=1 for local recovery. Hosts should preserve a recovery path consistent with their policy.

Browser transactions

The frontend calls the host’s beginExternalIdentity. externalIdentityScope freezes the endpoint, realm and session. The shared flow uses state, PKCE, short-lived HttpOnly cookies and proof held by the initiating tab. The completion page exchanges a short-lived completion code and hands the login result back to the host.

Keep JWTs and refresh tokens out of provider callback URLs. Reaching a callback page is only one step: complete the controlled exchange and verify that the initiating scope is still valid.

Configuration, linking and sessions

Entry pointResponsibility
/api/adminidentity/[action]Providers, publication, policy, public origin, linking review and administrator operations
/api/identity/[action]Login start / completion, personal linking, recent confirmation and sessions
TAdminExternalCallbackShared frontend completion page
TAdminAccountSecurityPersonal external accounts and sessions

Account linking requires explicit proof. Matching email addresses or display names alone do not prove ownership. Unlinking and sensitive operations use recent confirmation and session protection. A flow started before logout, tab changes or a new login must never attach to the new identity.

Client implementation: TAdmin/samples/TAdmin.Sample/web/src/api/identity.ts.