# Logout question

**URL:** <https://devforum.okta.com/t/logout-question/890>\
**Category:** Questions\
**Tags:** dotnet\
**Created:** [December 12, 2017, 4:14am UTC](https://devforum.okta.com/t/logout-question/890 "2017-12-12T04:14:03Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![zhangming870](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/zhangming870/32/257_2.png) [@zhangming870](https://devforum.okta.com/u/zhangming870)\
**Post date:** [December 12, 2017, 4:14am UTC](https://devforum.okta.com/t/logout-question/890/1 "2017-12-12T04:14:04Z")

</div>

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](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](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.

---

<div class="post-metadata">

**Author:** ![tom](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/tom/32/24_2.png) [@tom](https://devforum.okta.com/u/tom)\
**Post date:** [December 13, 2017, 10:23pm UTC](https://devforum.okta.com/t/logout-question/890/2 "2017-12-13T22:23:13Z")

</div>

@nate.barbettini @lee.brandt ^

---

<div class="post-metadata">

**Author:** ![nate.barbettini](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/nate.barbettini/32/385_2.png) [@nate.barbettini](https://devforum.okta.com/u/nate.barbettini)\
**Post date:** [December 18, 2017, 11:02pm UTC](https://devforum.okta.com/t/logout-question/890/3 "2017-12-18T23:02:34Z")

</div>

> [@zhangming870](#):
>
> I have no idea why I must set my “Logout redirect URI” to baseurl/signout-callback-oidc

The OIDC middleware in [ASP.NET](http://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](http://ASP.NET) Core OIDC middleware uses.

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

> [@zhangming870](#):
>
> And why it gives me a bad request error message??

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.

---

<div class="post-metadata">

**Author:** ![nate.barbettini](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/nate.barbettini/32/385_2.png) [@nate.barbettini](https://devforum.okta.com/u/nate.barbettini)\
**Post date:** [December 18, 2017, 11:03pm UTC](https://devforum.okta.com/t/logout-question/890/4 "2017-12-18T23:03:18Z")

</div>

@zhangming870 If you are still having trouble with logout, let me know what version of [ASP.NET](http://ASP.NET) you are using, and what your `Startup` class looks like.

---

<div class="post-metadata">

**Author:** ![kwzhang](https://avatars.discourse-cdn.com/v4/letter/k/e274bd/32.png) [@kwzhang](https://devforum.okta.com/u/kwzhang)\
**Post date:** [April 26, 2022, 12:52am UTC](https://devforum.okta.com/t/logout-question/890/5 "2022-04-26T00:52:01Z")

</div>

@zhangming870 I found if I use /abcd insteda of /signout-callback-oidc, it still can redirect correctly, but if I used /signout-oidc, it doesn’t redirect correctly, looks like “signout-oidc” is special to okta.

Does any one has same issue?

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/oktadev/original/1X/589c4c5f80de422d01f47cee7185a7fb8227835c.png) [@system](https://devforum.okta.com/u/system)\
**Post date:** [February 12, 2024, 9:10pm UTC](https://devforum.okta.com/t/logout-question/890/6 "2024-02-12T21:10:24Z")

</div>

Closed on February 12, 2024, 9:10pm UTC

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.
