I’m logging out with:
webAuth.logout({
clientId: webAuth.baseOptions.clientID,
returnTo: window.location.origin,
})
I verified that Auth0.js is passing my returnTo
URL in dev tools:
You can see returnTo=http%3A%2F%2Flocalhost%3A4000
in the console.
I’ve added this URL (http://localhost:4000
) to my allowed logout URLs in my dev app in Auth0.
Yet Auth0 never redirects to it after logging out, it just stays on the login page. When I log back in, it uses the same redirectUri
from the last call to webAuth.authorize
, which is causing problems (it contains my own ?nextLocation=...
parameter for redirecting after login, but that parameter is no longer valid).
Am I doing something wrong or is this a bug? I thought Auth0.js would log the user out and then return to http://localhost:4000
because that’s what I passed for returnTo
.