Auth0 Home Blog Docs

Logout with redirectTo passes to wrong URL from Allowed Logout URLs


I tried to logout with redirect (Laravel 5.7):

$logoutUrl = sprintf(
return \Redirect::intended( $logoutUrl);

The URL is also mentioned in Allowed Logout URLs after one URLs used for development (they are completely different and comma-separated as described in docs).

Code in both applications is same, excepts data from env files.

My problem is - when I tried to logout using the code above - I was redirected to first URL from Allowed Logout URLs and it’s disappointing

So, is that my problem and I need to seek in my code for redirects normal behavior or I need to change something in application setting on auth0 side?


Can you share the exact logout URL that the browser requests, and the 302 response returned by Auth0? (You can see this in the browser’s network tab in the developer tools)


Thanks for fast answer!!!

Logout URL that the browser requests

URLs in Allowed Logout URLs are (as they present there):, http://localhost/wallter/wallter/public_html/pre_login

Network tab in the developer tools


  1. Logout (local)

  2. Logout (auth0)

  3. Pre_login (my custom page. Must be local, but it redirected to remote app (not localhost))

If you need more info, I’m all yours :slight_smile:


It looks as if you are using redirectTo as the parameter to indicate the return URL, but the parameter name should be returnTo.
Sorry I missed that in the original code snippet.


Thank you Nicolas!
As I saw - all my troubles was my inattention to little things, such as returnTo and redirectTo.

Thanks again!

1 Like

Happens to all of us! :smiley:

closed #7

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