We are looking to integrate an external OIDC identity provider as a social/external login in our ABP Commercial application, following the Account Pro module documentation (AddOpenIdConnect + WithDynamicOptions). The OIDC provider we need to integrate only supports private_key_jwt as the token endpoint authentication method — meaning no client_secret_basic or client_secret_post is available. The current documented pattern assumes a client secret, which doesn't apply when using private_key_jwt (where the client authenticates by signing a JWT with a private key instead).
Some questions:
Does ABP Commercial have any existing support or documented approach for external OIDC providers that require private_key_jwt authentication?
Is there any planned support for private_key_jwt in the external login infrastructure — for example as part of WithDynamicOptions or the Account Pro module?
If we implement this ourselves via OpenIdConnectEvents customization, are there any ABP-specific pitfalls we should be aware of — particularly around how this interacts with OpenIddict, the Account module's external login flow, and user creation/mapping?
https://oauth.net/private-key-jwt/
Any guidance or pointers would be appreciated.
Thanks
2 Answer(s)
-
0
ABP Commercial doesn’t add a special “private_key_jwt” switch for external OIDC providers in Account Pro’s external login infrastructure. The documented
AddOpenIdConnect(...).WithDynamicOptions(...)pattern exposesClientSecretas a dynamic property, but it’s just a convenience layer over ASP.NET Core’sOpenIdConnectHandlerand doesn’t inherently limit you to client-secret auth. There is no verified ABP doc/source that explicitly documents built-in private_key_jwt support for external OIDC token endpoint authentication.Planned support: I can’t confirm any roadmap item from verified sources regarding adding first-class
private_key_jwtsupport toWithDynamicOptions/Account Pro for external OIDC providers. (No verified source available for that.)Recommended approach: implement it at the ASP.NET Core OpenIdConnect layer (events/backchannel) and keep ABP’s external-login flow unchanged.
- Register the external provider as usual with
AddOpenIdConnect(...). - Keep using Account Pro’s external login UI and (optionally)
WithDynamicOptionsfor string properties likeAuthority,ClientId, etc. - Implement token request customization to send
client_assertion/client_assertion_typeinstead ofclient_secret.
Concretely, in ASP.NET Core OIDC, the token exchange happens inside the handler; the typical integration point is customizing OIDC events to adjust the token request sent to the token endpoint. Your goal is:
- Remove/ignore
client_secret - Add:
client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearerclient_assertion=<signed JWT>
ABP-specific pitfalls to watch for (these are the ones that most often break ABP external login, regardless of private_key_jwt):
- Sign-in scheme must be the external cookie:
- Register the external provider as usual with
options.SignInScheme = Microsoft.AspNetCore.Identity.IdentityConstants.ExternalScheme;- Map the subject claim to NameIdentifier (otherwise
GetExternalLoginInfoAsync()can end up null or user mapping fails):
options.ClaimActions.MapJsonKey(System.Security.Claims.ClaimTypes.NameIdentifier, "sub");- Ensure required claims/scopes for user creation: Account module commonly relies on
emailfor creating/registering external users. Request it if your provider doesn’t include it by default:
options.Scope.Add("email"); options.GetClaimsFromUserInfoEndpoint = true;Dynamic options:
WithDynamicOptionsis mainly for binding simple option properties (commonly strings). Your private key material/JWT signing logic typically won’t fit as a simpleWithProperty(...)mapping; instead, keep the key in your own storage and use it inside your OIDC event to generate the assertion.Interaction with OpenIddict / ABP auth server:
- Your external OIDC provider integration is happening in the UI host (Account Web) as an external authentication scheme.
- Your app’s internal auth (OpenIddict) is separate; ABP will still complete the external login, create/link the
IdentityUserLoginrecord, then issue your own tokens/cookies as usual. - So the main “ABP pitfalls” are not about OpenIddict itself, but about making sure the external scheme produces a valid external principal (name identifier, email, etc.) and uses
IdentityConstants.ExternalScheme.
Sources (validated):
- https://abp.io/docs/latest/modules/account-pro
- https://oauth.net/private-key-jwt/
This response was generated by AI. If it didn’t solve your problem, feel free to post a new answer — our support team will jump in to help you soon.
-
0
ABP support team answer please