Logout question

Hi expert,

I’m new here and I got questions after I finished 2 quick start examples. Both questions are about why/how to use logout redirect url.

The first quick start is here: https://github.com/oktadeveloper/okta-oauth-aspnet-codeflow
Everything works fine until I click logout button. From the debug console, I see it redirects application to here: /oauth2/v1/logout . I don’t configure anywhere, why it knows to go there?? And why it gives me a bad request error message??

The second quick start is here: https://github.com/oktadeveloper/okta-aspnetcore-mvc-example
Everything, including logout, works fine. But I have no idea why I must set my “Logout redirect URI” to baseurl/signout-callback-oidc

Please help, thanks in advance.

@nate.barbettini @lee.brandt ^

The OIDC middleware in ASP.NET redirects to the external provider (and back) when doing a logout, similar to how login works. The Logout redirect URI must be specified so Okta knows how to redirect back to your app after a logout. /signout-callback-oidc is the default logout callback path that the ASP.NET Core OIDC middleware uses.

If it’s configured correctly, this all happens quickly and transparently to the user.

This happens if the Logout redirect URI is not set in Okta, or if it doesn’t match what your application is trying to redirect to.

@zhangming870 If you are still having trouble with logout, let me know what version of ASP.NET you are using, and what your Startup class looks like.