configure-openiddict-authentication
Configure OpenIddict Authentication in ABP
ABP's OpenIddict module wraps OpenIddict to provide the OAuth 2.0 / OpenID Connect auth server (single sign-on, single log-out, API access control). Applications, scopes, authorizations and tokens are persisted to the database.
AbpOpenIddictAspNetCoreModule registers the server for you: it calls services.AddOpenIddict().AddServer(...), enables the standard flows (authorization code, hybrid, implicit, password, client credentials, refresh token, device, none, token exchange), registers the standard scopes (openid, email, profile, phone, roles, address, offline_access), and enables ASP.NET Core pass-through for the connect/* endpoints. You customize it through PreConfigure<...> and Configure<...>.
The framework enabling a flow doesn't mean a new client should use it: for new clients prefer authorization code + PKCE (web / SPA / mobile) or client credentials (server-to-server), and treat implicit and password (ROPC) as legacy — enable them only for existing clients that still require them.
When to Use
- Adjusting token lifetimes (authorization code, access, identity, refresh).
- Enabling refresh tokens (
refresh_tokengrant +offline_accessscope). - Configuring PKCE.
- Allowing HTTP locally by disabling the transport-security requirement in development.
- Registering production signing/encryption certificates.
- Toggling access-token encryption, claim destinations, or the token-cleanup background job.