Skip to content

Commit

Permalink
fix(nuxt-auth): fix callback url
Browse files Browse the repository at this point in the history
  • Loading branch information
gravitano committed Feb 28, 2023
1 parent a6b168f commit a71ced4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions starter/nuxt-auth/components/auth/AuthLogin.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,10 @@ const onSubmit = handleSubmit(async (values) => {
return;
}
// get path name from callback url
const callbackUrl = new URL(String(route.query?.callbackUrl)).pathname;
const callbackUrl = String(route.query?.callbackUrl);
router.push(
String(route.query.next || callbackUrl || appConfig.auth.redirect.home),
String(route.query?.next || callbackUrl || appConfig.auth.redirect.home),
);
});
Expand Down

0 comments on commit a71ced4

Please sign in to comment.