Confirm you've already contributed to this project or that you sponsor it
[ ] I confirm I'm a sponsor or a contributor
Version
5.6.0
Question
Hello, good afternoon, I would like to see if you can support me. I am using the following structure: my server application with openiddict, a client with angular and my application with webapi. I'm using introspective. using the resource. Everything works fine for me in tests, but when publishing when it reaches the API it marks me as unauthorized. In tests the entire flow works well. I put my settings
builder.Services.AddOpenIddict()
.AddValidation(options =>
{
// Note: the validation handler uses OpenID Connect discovery
// to retrieve the issuer signing keys used to validate tokens.
options.SetIssuer(builder.Configuration.GetValue<string>("OpenIddict:Url"));
options.AddAudiences("resource_server_2");
options.UseIntrospection()
.SetClientId("resource_server_2")
.SetClientSecret("EficienciaTalleres2025#4");
// Register the System.Net.Http integration.
options.UseSystemNetHttp();
// Register the ASP.NET Core host.
options.UseAspNetCore();
options.AddEventHandler<OpenIddictValidationEvents.ProcessAuthenticationContext>(builder =>
{
builder.UseInlineHandler(context =>
{
Console.WriteLine(context.ValidateAccessToken);
return ValueTask.CompletedTask;
});
});
options.AddEventHandler<OpenIddictValidationEvents.PrepareConfigurationRequestContext>(builder =>
{
builder.UseInlineHandler(context =>
{
Console.WriteLine(context.Error);
return ValueTask.CompletedTask;
});
});
});
It is only when I publish in productive, the client does the authentication well, but when I communicate with the api in productive it fails. You can support me. Thank you so much
Support is reserved to sponsors and contributors. For more information on how to sponsor the project on GitHub, visit https://github.com/sponsors/kevinchalet.
Confirm you've already contributed to this project or that you sponsor it
Version
5.6.0
Question
Hello, good afternoon, I would like to see if you can support me. I am using the following structure: my server application with openiddict, a client with angular and my application with webapi. I'm using introspective. using the resource. Everything works fine for me in tests, but when publishing when it reaches the API it marks me as unauthorized. In tests the entire flow works well. I put my settings
1.-
2.- Angular
3.- Mi configuración del API
It is only when I publish in productive, the client does the authentication well, but when I communicate with the api in productive it fails. You can support me. Thank you so much