<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
0D54z000080s2QXCAYOkta Classic EngineAuthenticationAnswered2023-01-19T17:20:50.000Z2022-08-30T17:32:36.000Z2022-08-31T17:32:17.000Z

GregoryL.46683 (Customer) asked a question.

How to disconnect from Okta when pressing Logout in Swagger

I have a .Net Core 6 web api, which I have integrated with Okta and Swagger.

When I bring up the generated Swagger document, I can Authenticate through Okta by pressing the Authorize button to bring up the Authorize popup. When I enter the Client ID, check the Scope and then press the Authorize button on the Authorize popup, I receive the Okta login. I enter credentials and hit enter and am returned to the Authorize popup. The popup shows that I am Authorized. I can now invoke my endpoints with no problem.

 

However, when I press the Authorize button to bring up the Authorize popup and then press the Logout button, it appears to only invalidate the Access token. If I close the popup and then go through the steps above to Authenticate, I no longer receive the Okta login prompt. In fact, if I go to my Okta Development site, it doesn't prompt me for credentials either.

 

It would appear that when Swagger invokes the Okta token endpoint, I receive the Okta login prompt (only if I am not already logged in).

Has anyone been able to determine how to get Okta to log the user out when they press the Logout button?

I'd like to be able to log in with various user's credentials to test roles without having to go to my Okta Development site and Logout from there.


  • User16594883467582706479 (Customer Support Online Experience)

    Hi, @GregoryL.46683 (Customer)​ 

     

    Thank you for posting on our Community page!

     

    I have done some research and I found the articles below which better explain user logout, although it could not be explicitly related to your use case:

     

    Furthermore, my advice would be to leverage the Okta Developer forums for this type of questions and take advantage of their expertise.

     

    Hope this helps!

     

    Thank you for reaching out to our Community and have a great day!

     

    _____________________________________________________________________________

    The Okta Community Catalysts Program is now live. Collect online badges when you participate in the Okta Help Center Questions community. Learn more here.

    _____________________________________________________________________________

     

    Expand Post
    • GregoryL.46683 (Customer)

      Thank you Laura. I’ve read both of the links that you provided, and it doesn’t appear to apply to the issue of logging out of Okta when pressing the Swagger Logout.

      I will post the question on the devforum, as I can’t be the only person to notice this problem.

      Thank you,
      Greg
      Expand Post
This question is closed.
Loading
How to disconnect from Okta when pressing Logout in Swagger