.Net MVC example Logout causes error


I tried executing code for the .NET MVC login example from here: https://github.com/oktadeveloper/okta-aspnet-mvc-example.

Login is working fine.But when i click on logout i am getting 400 Bad request - The id token is invalid.

The PostLogoutRedirectUri is “http://localhost:8080/Account/PostLogout” as it was in your sample.I have made no change here.Also i have updated the same in my Okta account.

My Okta account - application setting is


Fixed. As i made a mistake in the id token.



Hello Diya,

How did you managed to fixed this?


Hi @mdighe10

The error usually occurs if the ID token sent to the /logout endpoint of the authorization server is incorrect or if it was issued for a different authorization server. You can find here the documentation describing the process.

If you still encounter an issue, please open a support ticket with us by sending an email to developers@okta.com and one of our Developer Support Engineers will further assist you.