Allowed Logout URLs

I’ve implemented Auth0 in an app made with React-Vite.
The question is that when I do the Login or Logout I get an error that the page does not have access in Allowed Logout URLs.

My main route right now is:
http://localhost:3002
I have other routes like:
http://localhost:3002/contact
http://localhost:3002/blog

I added the following under Allowed Logout URLs and Allowed Callback Origins:
http://localhost:3002
http://localhost:3002/blog
http://localhost:3002/contact
Do I have to add route by route? or
How do I do the login and logout in 1 line and redirect me to the previous page from any page? Something like:
http://localhost:3002/*

In the logout button, I have the following:
onClick={() => logout({ logoutParams: { returnTo: window.location.href } })}

Hi @asilvazavala,

Welcome to the Auth0 Community!

There should be a clickable Technical Details button on the error page that shows more information about the error, specifically, it should state the logout URL that was not included in your Allowed Logout URLs in your Application settings.

After you have included that logout URL to your Allowed Logout URLs and have the logout button redirect the user the one of the Allowed Logout URLs, this should fix the error.

If you still encounter issues after making these changes, could you please capture the login and logout events in a HAR file and send them to me as a direct message to investigate further?

Thanks,

Rueben

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