Logout does not log user out

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/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”)

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

Ok I’ll try.
Thank you for prompt response

Thank you. It worked!!

1 Like

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