I’m using the Auth JS in my Vue client and attempting to secure my .NET Core API as well. Calls to my API are failing. I’ve ensured that both applications have the same issuer property set. Also, I’ve set the API up in the Authorization Server configuration area.
When using fiddler, I see the authorization fails for the following reason: WWW-Authenticate: Bearer error=“invalid_token”, error_description=“The signature key was not found”.
I’m using Okta’s Auth JS solution in my Vue.js client to request a token from Okta, and then I’m adding the accessToken to the header of requests to my API. The API is rejecting those requests.
If you are trying to locally validate access tokens on your .NET resource server, you MUST use a custom authorization server (by default, the .NET SDK will assume you have the ‘default’ custom authorization server available). More details about this limitation here.
It looks like you are not using the custom server in your vue app, while your .NET server seems to be expecting it.
Can you try setting the issuer for your Vue app to be the same ‘Default’ authorization server to see if you can get tokens that will work with your resource server? To use the default server, the issuer you set in Auth JS should be https://org.okta.com/oauth2/default
Note that not all Okta tenants have the ‘default’ auth server or the ability to create custom authorization servers. An additional paid feature may be required, depending on your contract. More details about the different types of authorization servers available here.