Skip to content

Conversation

@maliming
Copy link
Member

@maliming maliming commented Jan 9, 2026

AddAbpOpenIdConnect("oidc", options =>
{
    //...
    options.ClientId = configuration["AuthServer:ClientId"];
    options.ClientSecret = configuration["AuthServer:ClientSecret"];
    options.UsePkce = true;
    //...

    options.Events.OnTokenResponseReceived = ctx =>
    {
        ctx.Properties?.SetString("client_id", configuration["AuthServer:ClientId"]);
        ctx.Properties?.SetString("client_secret", configuration["AuthServer:ClientSecret"]);
        return Task.CompletedTask;
    };
});

https://abp.io/support/questions/10288/

```cs
AddAbpOpenIdConnect("oidc", options =>
{
    //...
    options.ClientId = configuration["AuthServer:ClientId"];
    options.ClientSecret = configuration["AuthServer:ClientSecret"];
    options.UsePkce = true;
    //...

    options.Events.OnTokenResponseReceived = ctx =>
    {
        ctx.Properties?.SetString("client_id", configuration["AuthServer:ClientId"]);
        ctx.Properties?.SetString("client_secret", configuration["AuthServer:ClientSecret"]);
        return Task.CompletedTask;
    };
});
```
@maliming maliming marked this pull request as ready for review January 12, 2026 05:52
Copilot AI review requested due to automatic review settings January 12, 2026 05:52
@maliming maliming added this to the 10.1-final milestone Jan 12, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds support for dynamic client credentials in token introspection by allowing client_id and client_secret to be retrieved from authentication properties. This enables scenarios where different client credentials need to be used for token introspection than those configured in the OpenIdConnect options.

Changes:

  • Added retrieval of client_id and client_secret from authentication properties with fallback to OpenIdConnect options
  • Fixed method modifier order from async static to static async for one helper method

@maliming maliming requested a review from EngincanV January 12, 2026 06:06
@EngincanV EngincanV merged commit 603fe8c into rel-10.1 Jan 12, 2026
9 of 10 checks passed
@EngincanV EngincanV deleted the CheckTokenExpiration branch January 12, 2026 10:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants