Hello there!
i’m new on this forum. I have difficulties when setting up authentication in my Web API.
I got this message when accessing my API endpoint:
invalid_token, signature is invalid
the access token is working well when i use it on postman, for example when call this endpoint: oauth2/v1/userinfo
this is my code on startup.cs
services
.AddAuthentication(options =>
{
options.DefaultAuthenticateScheme = OktaDefaults.ApiAuthenticationScheme;
options.DefaultChallengeScheme = OktaDefaults.ApiAuthenticationScheme;
options.DefaultSignInScheme = OktaDefaults.ApiAuthenticationScheme;
}).AddOktaWebApi(new OktaWebApiOptions()
{
OktaDomain = Configuration["Security:OpenIdConnect:OktaDomain"],
AuthorizationServerId = "default",
Audience = "api://default"
});
am i missed something?
thanks!