<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
0D51Y0000628hbfSAAOkta Classic EngineSingle Sign-OnAnswered2019-03-08T21:36:50.000Z2019-03-07T17:24:56.000Z2019-03-08T21:36:50.000Z

JeffB.20375 (Customer) asked a question.

Obtain an access_token with Okta Hosted UI cookie

I am using dotnetcore to authenticate with Okta using their hosted UI. This is working great, but now I wan to allow this user to talk to APIs using bearer tokens. How do I get an access_token for a user once they authenticated with Okta hosted ui cookies? Am I thinking about this wrong? Any help would be appreciated.


  • JeffB.20375 (Customer)

    Not sure if I should put the answer here, but I think I figured out my disconnect. There is a checkbox in the Okta dashboard for your app that asks if you want to include the "Refresh" token. Once this was checked I could get all the tokens I needed using HttpContext.GetTokenAsync("refresh_token")

This question is closed.
Loading
Obtain an access_token with Okta Hosted UI cookie