# Logout does not log user out

**URL:** <https://community.auth0.com/t/logout-does-not-log-user-out/58710>\
**Category:** Get Help\
**Tags:** logoutrequest, logout, logout-redirect\
**Created:** [March 1, 2021, 8:27pm UTC](https://community.auth0.com/t/logout-does-not-log-user-out/58710 "2021-03-01T20:27:59Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![neek](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/neek/32/25745_2.png) [@neek](https://community.auth0.com/u/neek)\
**Post date:** [March 1, 2021, 8:27pm UTC](https://community.auth0.com/t/logout-does-not-log-user-out/58710/1 "2021-03-01T20:27:59Z")

</div>

Logout link does not log user out.  
The link works, goes to the /out.html page, but when I type into url: /home (or any other @requires\_auth page) I am able to enter the page. I need the user to be asked to Log-In again.

**Auth0 - Tenant Settings - Advanced - Allowed Logout URLs:** (I have 2 added)  
[https://www.mydomain.com/out](https://www.mydomain.com/out),  
[https://www.mydomain.com/v2/logout?returnTo=http%3A%2F%2Fwww.mydomain.com/out&client\_id=CLIENT\_ID](https://www.mydomain.com/v2/logout?returnTo=http%3A%2F%2Fwww.mydomain.com/out&client_id=CLIENT_ID)

**My Logout link:**  
id=“qsLogoutBtn” href=“/out”\>Log Out\<

**My app.py:**  
@app.route(“/logout”)  
def logout():  
session.clear()  
params = {‘returnTo’: url\_for(‘out’, \_external=True), ‘client\_id’: AUTH0\_CLIENT\_ID}  
return redirect(auth0.api\_base\_url + ‘/v2/logout?’ + urlencode(params))

@app.route(“/out”)  
def out():  
return render\_template(“out.html”)

---

<div class="post-metadata">

**Author:** ![stephanie.chamblee](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/stephanie.chamblee/32/26087_2.png) [@stephanie.chamblee](https://community.auth0.com/u/stephanie.chamblee)\
**Post date:** [March 1, 2021, 8:45pm UTC](https://community.auth0.com/t/logout-does-not-log-user-out/58710/3 "2021-03-01T20:45:15Z")

</div>

Hi @neek,

Welcome to the Community!

I see that the “Log Out” links to `/out`, but it looks like the link would need to navigate to `/logout` instead if I’m not mistaken.

You may have already spun up the Python Quickstart app, but just in case: [Auth0 Python SDK Quickstarts: Login](https://auth0.com/docs/quickstart/webapp/python/01-login)

---

<div class="post-metadata">

**Author:** ![neek](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/neek/32/25745_2.png) [@neek](https://community.auth0.com/u/neek)\
**Post date:** [March 1, 2021, 9:21pm UTC](https://community.auth0.com/t/logout-does-not-log-user-out/58710/4 "2021-03-01T21:21:51Z")

</div>

Ok I’ll try.  
Thank you for prompt response

---

<div class="post-metadata">

**Author:** ![neek](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/neek/32/25745_2.png) [@neek](https://community.auth0.com/u/neek)\
**Post date:** [March 1, 2021, 10:36pm UTC](https://community.auth0.com/t/logout-does-not-log-user-out/58710/5 "2021-03-01T22:36:43Z")

</div>

Thank you. It worked!!

---

<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:** [March 16, 2021, 10:37pm UTC](https://community.auth0.com/t/logout-does-not-log-user-out/58710/6 "2021-03-16T22:37:27Z")

</div>

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