# Vue3 Callback URL mismatch

**URL:** <https://community.auth0.com/t/vue3-callback-url-mismatch/103939>\
**Category:** Get Help\
**Tags:** configuration, application\
**Created:** [April 1, 2023, 6:43pm UTC](https://community.auth0.com/t/vue3-callback-url-mismatch/103939 "2023-04-01T18:43:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kruml](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/kruml/32/46002_2.png) [@kruml](https://community.auth0.com/u/kruml)\
**Post date:** [April 1, 2023, 6:43pm UTC](https://community.auth0.com/t/vue3-callback-url-mismatch/103939/1 "2023-04-01T18:43:24Z")

</div>

Hi!  
Been following the quick setup guide for Vue, but can’t seem to get it to work. I’m running a Vite based project. Here is my main.ts:

```auto
app.use(
    createAuth0({
        domain: authConfig.domain,
        clientId: authConfig.clientId,
        authorizationParams: {
            redirect_uri: window.location.origin,
        },
    })
);

```

And my login function here

```auto
const auth0 = useAuth0();

const login = async () => {
  await auth0.loginWithRedirect();
};

```

The port I set in Application settings should be 5173:

```auto
  VITE v4.0.4 ready in 760 ms

  ➜ Local: http://localhost:5173/
  ➜ Network: use --host to expose
  ➜ press h to show help

```

And I’ve set the paths properly in Application Details:

 ![image](https://global.discourse-cdn.com/auth0/original/3X/7/7/77f2e682c9824637e814e2b36054e1b617df83b5.png)

Here is my router aswell. (RegisterView is just an old component I route to for now, the name obv doesnt make sense in this context)

```auto
import { createRouter, createWebHashHistory } from "vue-router";
import AppLayout from "@/layout/AppLayout.vue";
import PackPlannerView from "@/views/PackPlannerView.vue";
const router = createRouter({
  history: createWebHashHistory(),
  routes: [
    {
      path: "/",
      component: AppLayout,
      children: [
        {
          path: "/",
          component: PackPlannerView,
        },
        {
          path: "/registerform",
          name: "registerform",
          component: () => import("@/views/RegisterView.vue"),
        },
        {
          path: "/callback",
          name: "callback",
          component: () => import("@/views/RegisterView.vue"),
        },
      ],
    },
  ],
});

export default router;

```

But I still get this error

 ![image](https://global.discourse-cdn.com/auth0/original/3X/d/6/d6addbae168fba9536bc840b5b75f4e23bcce04a.png)

Any ideas as to what I’m missing?

---

<div class="post-metadata">

**Author:** ![kruml](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/kruml/32/46002_2.png) [@kruml](https://community.auth0.com/u/kruml)\
**Post date:** [April 1, 2023, 7:37pm UTC](https://community.auth0.com/t/vue3-callback-url-mismatch/103939/2 "2023-04-01T19:37:57Z")

</div>

Changing the port to 3000 seems to have solved the problem for some reason!

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [April 15, 2023, 7:38pm UTC](https://community.auth0.com/t/vue3-callback-url-mismatch/103939/3 "2023-04-15T19:38:57Z")

</div>

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