Search code examples
asp.net-mvc-5saml-2.0okta

How to get Log User Out first from Okta and then .Net MVC Application using SAML 2.0


I have done the Single Sign On (SSO) using the Okta SAML 2.0. I have created the account in Okta and then Created the App with options Web - SAML 2.0 and did the configuration that I found in some blogs. Then after I have followed the this blog to complete the Sign In Flow and its working fine but now I am looking for How to Log User Out using Single Logout URL? I tried to search but mostly I found solution for ASP.Net Core and Okta SAML API. I have not used OIDC, I have complete the Proof of Concept for Sign In using SAML 2.0. Does anyone have any idea on this?


Solution

  • I found the the way to get it logout from Okta from ASP.Net MVC Web Application is: from the ASP.Net MVC Web Application LogOut/LogOff (whatever the ActionResult name could be) ActionRetult, once the Application Session Cleared Redirect to

    https://your_tenant.okta.com/login/signout?fromURI=your_redirect_here
    

    and it will terminate the Session from the Okta as well. This is useful for when SSO implemented using SAML 2.0 into ASP.Net MVC Web Application NOT for OIDC (OpenID Connect) method.

    More information can be found HERE