Problems with Auth0 loginWithRedirect() - stuck on callback after login | Vue.js

I got a problem with my vue application with Auth0.

I implemented auth0 inside my vue3 application according to the provided manual:Vue.js Authentication By Example: Composition API

I used as well the appState.

<template>
  <div>
    <q-btn
      label="Login"
      @click="login()"
    />
  </div>
</template>

<script>
import { useAuth0 } from "@auth0/auth0-vue";
export default {
  setup() {
    const { loginWithRedirect } = useAuth0();

    return {
      login: () => {
        loginWithRedirect({
          appState: { target: "/app/test" },
        });
      },
    };
  },
};
</script>

I am redirected to the authentication page (auth0) and can successfully login and be redirected to my callback page.

The problem is - that’s it. I don’t get redirected to “/app/test” or “/”.

According to the manual - I should be redirected to “/” if I don’t have the appState set. I tried both - I always get stuck on the callback page.

No errors or whatever - user is also successfully logged in.

I know - I could cheat with a redirect on the callback page with router.push(), but that’s not what I want - I want to pass some url parameters from the login page.

Can anyone help me?

Found the solution - it happened to be a problem with quasar and auth0-vue

For anybody who’s interested, check out the issue on GitHub

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