On this page
Sign users out
Note: This document is written for Okta Classic Engine. If you are using Okta Identity Engine, see User sign out (local app) for relevant guidance. See Identify your Okta solution (opens new window) to determine your Okta version.
This guide explains an important part of security, which is to minimize the chances that a malicious actor uses an existing session to perform unauthorized actions. It explains the most common strategies to prevent unauthorized use of a session, which include setting short token lifetimes and giving users the ability to sign out when they are done. This guide explains how to sign users out of Okta and out of your app.
- Sign users out of Okta.
- Sign users out of your app.
What you need
- Okta Developer Edition organization (opens new window)
- An app that can sign in to Okta. To create your own, see the following guides:
Signing users out of an app that is secured using Okta requires that you close the user's session in Okta. In cases where your app also has a session, you also need to close the user's app session.
Okta Session: Okta maintains a session for the user and stores their information inside an Okta-specific cookie. The next time that a user is redirected to the Okta sign-in page, the user's information is remembered. Sign users out of Okta by clearing the Okta browser session.
Application Session: Most apps have their own user sessions that you need to close in addition to an Okta user session.
Signing out of Okta requires the app to open a browser and navigate to the end session endpoint. Okta ends the user's session and immediately redirects the user back to your application. To do this, you must define a callback route for the sign-out process, which means that you need to allow the post sign-out URL in your Okta app integration settings. If you don't specify a
post_logout_redirect_uri, then the browser is redirected to the Okta sign-in page.
Sign in to your Okta organization with your administrator account.
In the Admin Console, go to Applications > Applications.
Select your app integration.
On the General tab, click Edit in the General Settings section.
In the Sign-out redirect URIs section, add the base URI of your application.
Click Save to confirm your changes.
Sign users out of Okta by ending their session on the Okta Authorization Server.
Sign users out of your application by ending their local session. This signs the user out of your app, but doesn't sign the user out of Okta.
The steps required to end the app session vary depending on the type of app that you are using.
You might want to configure self-service registration for your org:
Read more on customizing your org: