In this sample “TokenUrl”: “https://{yourOktaDomain}/oauth2/default/v1/token”. But I am getting a 400: {“error”:“invalid_scope”,“error_description”:“One or more scopes are not configured for the authorization server resource.”}
How do I fix this? I am using https://dev-534507.okta.com/oauth2/default/v1/token under my dev account.
Which sample are you trying to get working? We need more information in order to help you.
Sorry, my fault. https://developer.okta.com/blog/2018/02/01/secure-aspnetcore-webapi-token-auth
Adding the Scope: “access_token” to the default server fixed that issue. Now the service is not working with the Bearer token passed by SimpleApiService.GetValues()?
I am using .Net Core 2.1 and the only valid version of Okta.AspNetCore for it is 1.1.3.
On another PC with .Net 3.0 I was able to fix it with:
[Authorize(AuthenticationSchemes = JwtBearerDefaults.AuthenticationScheme)]
public class ValuesController : ControllerBase