<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
0D51Y00009hK7ASSA0Okta Classic EngineSingle Sign-OnAnswered2020-10-30T12:00:07.000Z2020-10-10T06:55:25.000Z2020-10-11T05:19:05.000Z

MarcinR.97051 (Customer) asked a question.

What is the right way to build my own App/API using Okta as OIDC provider?

Hi All,

 

I'm porting over some OIDC authentication code from Auth0 to Okta, and I'm seeing some behaviors that I can't quite figure out.

 

I've created a very basic OIDC application in Okta, and I am using the authorization code flow.

 

The /authorize endpoint works great. I redirect a user there, and it redirects them back to me with an autorization code.

 

Next, I exchange the authorization code for tokens via the /token endpoint, which works fine, my API server receives an access_token and an id_token.

 

However, this is where I get stuck.

 

You can not trust tokens without verifying them, so my API server needs the JWKS for my OIDC app. I can't find a way to get these. The documentation for the /keys endpoint is incomplete.

 

When I try to get the JWKS for the default server, O get permission denied:

`curl https://deepmap.okta.com/oauth2/default/v1/keys

{"errorCode":"E0000006","errorSummary":"You do not have permission to perform the requested action","errorLink":"E0000006","errorId":"oae2UVIFczaQfO9ThgaCwFUwQ","errorCauses":[]}`

 

There is a JWKS available at my top level base URL, but it doesn't contain the keys which were used to sign my access_token and id_token

 

When I call the /introspect endpoint to validate the tokens, it says

`{

  "error": "access_denied",

  "error_description": "The requested feature is not enabled in this environment."

}`

 

So, how do I accomplish this:

1) I would like to have an Okta app in my company dashboard

2) which does the OpenID connect Authorization Code workflow

3) allowing me to verify the JWT's which okta issues.

 

Thank you.

 

 

 


This question is closed.
Loading
What is the right way to build my own App/API using Okta as OIDC provider?