Open the controller where you handle the sign-out process and update the
SignOut action. This time you need to also sign the user out of the Okta OIDC middleware with
using statements to import the following namespaces:
After you sign users out of your app and out of Okta, you have to redirect users to a specific location in your application. You need to whitelist the post sign-out URL in your Okta application settings.
Open the Okta Developer Console:
Go to Console
Select Applications, and then pick your application.
Select General and click Edit.
Add the post sign-out URL in the Logout redirect URI field (for example,
Then, you have to modify the Okta configuration in your application to also include the Logout redirect URI.
Startup.cs file and update the
Configuration method to include
PostLogoutRedirectUri in the Okta configuration:
Finally, add the desired logic for the post sign-out callback.
Open the controller where you handle the sign-out process and add a