<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
0D54z000075XsjYCASOkta Classic EngineIntegrationsAnswered2021-10-28T17:22:06.000Z2021-08-06T09:11:38.000Z2021-08-12T07:06:23.000Z

VineethR.84761 (Customer) asked a question.

Okta OpenID and OAuth 2.0

I am trying to use OKTA for our user management system, but I don't want to use OKTA defined login page (including the custom login widget given by okta). I have return Angular universal application where the server code is return on a node server and the angular will be the front channel, I have created a custom login page using angular and then using expression session management, i am currently doing the session management. But when we want use other okta API i.e. majorly with respect to session API and User API, we are not able to get the access token and id token values to access these api, we need to create a static API key to access these API. But we would like to follow the actual Oauth 2.0 flow. So can someone suggest how this can be achieved. I would really like to have a call with the technical team to explain them our infra flow so that we can align on what can be improved


  • User15953055057917460785 (Developer Support)

    Hi Vineeth! When using OAuth for Okta, make sure you have the correct scopes granted for what you're trying to do. In your Okta app integration, if you go to Okta API Scopes tab, did you grant the following?

     

    • okta.sessions.read
    • okta.sessions.manage
    • okta.users.read
    • okta.users.manage

     

    Then, make sure that in your OIDC calls, you are including these scopes in the scope= query parameter.

     

    More info can be found here: https://developer.okta.com/docs/guides/implement-oauth-for-okta/overview/

    Expand Post
  • VineethR.84761 (Customer)

    I have enabled the API Scope, what i would really need to understand is how can i get the access token or token id for accessing these API after I login using Primary Authentication API, because currently i don't have a callback flow.

  • User15953055057917460785 (Developer Support)

    Hey Vineeth, did you take a look at the link in my last post? It explains that step of the process pretty well.

     

    At a high level, when you use our Primary Authentication API, you are receiving an Okta session cookie (sid). Then, with that cookie you can move on to an OAuth flow where you can obtain an access token.

    Expand Post
  • VineethR.84761 (Customer)

    Hi Cale,

     

    Actually i went through the links and did check about the SID cookie value, but i was getting a empty sid values, thats the reason why i wanted to check if anything is wrong in the flow which we are doing attached the screenshot for the same

    Screenshot 2021-08-12 at 12.35.40 PM 

    Expand Post
This question is closed.
Loading
Okta OpenID and OAuth 2.0