Okta Single Sign on implementation

My app integrates Okta sign in route where user is taken to a common okta login page of the enterprise and once authenticated, user is brought back to the application’s homepage.

I have implemented a logout method which implements:
HttpContext.Current.GetOwinContext().Authentication.SignOut(Microsoft.AspNet.Identity.DefaultAuthenticationTypes.ApplicationCookie);

and then the user is redirected to login page.

Here, for internal users of the system it logs them in automatically. But for external users, we would like to not allow that, and would like to show the user the login page where the user enters the credentials again.

Currently, the only way an external user sees a login screen is if they quit the browser (not just close) and revisit the URL. If they click on LogOut, it logs them back in automatically.

I tried implementing clearing of sessions, cache clearing, etc, but none of that seems to be working.

Thank you for your help.

I am not sure what is missing that needs to be implemented as part of logout process to make that happen.

Hi @jabber30

What is the difference between the internal users and the external ones? Based on this, you could have a separate authentication/signout logic based on the IP/IP class or any option that would be used in differentiating the types of users.

Well, difference would be that the internal users would already have a session in Okta, so if they visit the website, they should then automatically be able to sign in without having to manually enter the credentials. I am trying to figure out how I can make that happen.

External users would not be on the company network, so they would have to manually enter the username and password.