# Have trouble logging out - Bug in Auth0?

**URL:** <https://community.auth0.com/t/have-trouble-logging-out-bug-in-auth0/26718>\
**Category:** Get Help\
**Created:** [June 18, 2019, 6:35am UTC](https://community.auth0.com/t/have-trouble-logging-out-bug-in-auth0/26718 "2019-06-18T06:35:59Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![tore](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/tore/32/10278_2.png) [@tore](https://community.auth0.com/u/tore)\
**Post date:** [June 18, 2019, 6:36am UTC](https://community.auth0.com/t/have-trouble-logging-out-bug-in-auth0/26718/1 "2019-06-18T06:36:00Z")

</div>

In my application settings, under Allowed logout URLs I have entered “[https://localhost:5001/](https://localhost:5001/)”

But when I then try to logout, I get this error:

The “returnTo” querystring parameter “[https://localhost:5001/](https://localhost:5001/)” is not defined as a valid URL in “Allowed Logout URLs”. To add a new URL, please do it here: [https://manage.auth0.com/#/account/advanced](https://manage.auth0.com/#/account/advanced)

TRACKING ID: 8dc2209630d64ae65386

In the raw log output, there’s a section:

“details”: {  
“return\_to”: “[https://localhost:5001/](https://localhost:5001/)”,  
“allowed\_logout\_url”: ,  
“session\_id”: “owKFZIquCnu6RaD4RTNMsSBOBIjRlsLr”  
},

And I was surprised that the allowed\_logout\_url array is empty, should it not list the URLs as defined in the configuration?

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [June 18, 2019, 12:10pm UTC](https://community.auth0.com/t/have-trouble-logging-out-bug-in-auth0/26718/2 "2019-06-18T12:10:18Z")

</div>

Hey there @tore!

It should be working. Can you send me via private message the screenshot of your Allowed Logout URLs for that client?

Thank you!

---

<div class="post-metadata">

**Author:** ![tore](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/tore/32/10278_2.png) [@tore](https://community.auth0.com/u/tore)\
**Post date:** [June 18, 2019, 2:17pm UTC](https://community.auth0.com/t/have-trouble-logging-out-bug-in-auth0/26718/4 "2019-06-18T14:17:55Z")

</div>

> [@konrad.sopala](#):
>
> me via private message the screenshot of your Allowed Logout URLs for that client?
> 
> Thank you!

Another try

The “returnTo” querystring parameter “[https://localhost:5001/](https://localhost:5001/)” is not defined as a valid URL in “Allowed Logout URLs”. To add a new URL, please do it here: [https://manage.auth0.com/#/account/advanced](https://manage.auth0.com/#/account/advanced)

TRACKING ID: e6d1b9e7710f1ed2b405

So I am confused why the Allowed\_logout\_urls is empty in the log entry below

{  
“date”: “2019-06-18T14:16:24.220Z”,  
“type”: “flo”,  
“description”: “The "returnTo" querystring parameter "[https://localhost:5001/\](https://localhost:5001/%5C)” is not defined as a valid URL in "Allowed Logout URLs". To add a new URL, please do it here: [https://manage.auth0.com/#/account/advanced](https://manage.auth0.com/#/account/advanced)",  
“connection”: “Username-Password-Authentication”,  
“connection\_id”: “con\_BeUeQZrUjZVZvlP3”,  
“client\_id”: “aGfTSM8LyHALI8f7UR4mtT1uLspe0UJS”,  
“client\_name”: “ManualOpenIDConnect”,  
“ip”: “83.219.207.134”,  
“user\_agent”: “Chrome 74.0.3729 / Windows 10.0.0”,  
“details”: {  
“return\_to”: “[https://localhost:5001/](https://localhost:5001/)”,  
“allowed\_logout\_url”: ,  
“session\_id”: “owKFZIquCnu6RaD4RTNMsSBOBIjRlsLr”  
},  
“hostname”: “[edument.eu.auth0.com](http://edument.eu.auth0.com)”,  
“user\_id”: “auth0|58204d4ab6c8bb007f99b73f”,  
“user\_name”: “demo@edument.se”,  
“log\_id”: “90020190618141624220865981800901979475522222467928031250”,  
“isMobile”: false  
}

I am currently just experimenting with OpenID connect and the various flows, just to understand it all.

Best regards

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [June 18, 2019, 2:35pm UTC](https://community.auth0.com/t/have-trouble-logging-out-bug-in-auth0/26718/5 "2019-06-18T14:35:58Z")

</div>

Thank you for all that context! I’ll get back to you once I research it!

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [June 26, 2019, 2:41pm UTC](https://community.auth0.com/t/have-trouble-logging-out-bug-in-auth0/26718/6 "2019-06-26T14:41:33Z")

</div>

I just sent you a private message. Let’s keep the conversation there and then we’ll share the solution with the community once we work it out!

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [June 27, 2019, 10:16am UTC](https://community.auth0.com/t/have-trouble-logging-out-bug-in-auth0/26718/7 "2019-06-27T10:16:22Z")

</div>

**Solution**

Call logout with the client identifier of that application otherwise the URL needs to be added at the tenant settings.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [July 12, 2019, 10:16am UTC](https://community.auth0.com/t/have-trouble-logging-out-bug-in-auth0/26718/8 "2019-07-12T10:16:23Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![lihua.zhang](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/lihua.zhang/32/39683_2.png) [@lihua.zhang](https://community.auth0.com/u/lihua.zhang)\
**Post date:** [January 6, 2023, 9:38pm UTC](https://community.auth0.com/t/have-trouble-logging-out-bug-in-auth0/26718/9 "2023-01-06T21:38:37Z")

</div>

[This](https://community.auth0.com/t/redirect-users-after-logout/89786) FAQ explains the cause and solution for the below error, so link it to this topic.

`invalid_request: The "returnTo" querystring parameter "[https://YOUR_URL"](https://YOUR_URL)" is not defined as a valid URL in "Allowed Logout URLs"`
