I am attempting to use OpenIddict to set up a client credentials flow using
services.AddDbContext<MyDbContext>(options =>
{
options.UseOpenIddict();
}
services.AddOpenIddict()
.AddCore(options =>
{
options.UseEntityFrameworkCore()
.UseDbContext<MyDbContext>();
})
.AddServer(options =>
{
options
.SetTokenEndpointUris("/connect/token");
options
.AllowClientCredentialsFlow();
options
.AddDevelopmentEncryptionCertificate()
.AddDevelopmentSigningCertificate();
options
.UseAspNetCore()
.EnableTokenEndpointPassthrough();
});
services.AddAuthentication(options =>
{
options.DefaultAuthenticateScheme = "Identity.Application";
options.DefaultChallengeScheme = "Identity.Application";
options.DefaultSignInScheme = "Identity.Application";
});
services.AddAuthentication();
services.AddAuthorization();
services.AddRouting();
services.AddControllers();
When I invoke the token endpoint /connect/token
with the following client credentials (which are correct)
I get a 404 error message
Even if the backend was able to successfully validate the credentials
Can someone point in the correct direction? I have been pulling my hair out the entire day.