I’m building a Vue3 SPA with auth0 and for some reason I can’t get the redirect to work correctly.
I’ve tried both of these:
- Specifying the
redirect_uri
as a parameter forcreateAuth0Client
like so:
client = await createAuth0Client({
redirect_uri: "http://localhost:8080/about",
...options
})
- Specifying the
redirect_uri
in the immediate function tied to the login button, like so:
login() {
this.$auth.loginWithRedirect({
redirect_uri: 'http://localhost:8080/callback'
});
},
Both fail to redirect the user to /about
and instead land them on the homepage /
. /about
is definitely in the allowed URIs and there are no errors in the console after logging in.
To make things even weirder, right after login the URL bar of the browser says something like this for just a second:
http://localhost:8080/about?code=blahblahblah
but then quickly redirects to http://localhost:8080. So it seems it know that it should send the user to /about
but is failing to.
Why might this be?