From a77e689b3895c3ca2c6435d49e1526672da4ce68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maurice=20Preu=C3=9F?= Date: Thu, 22 Jun 2023 21:32:28 +0200 Subject: [PATCH] Update plugin.ts --- src/runtime/plugin.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runtime/plugin.ts b/src/runtime/plugin.ts index ce2236b..6220051 100644 --- a/src/runtime/plugin.ts +++ b/src/runtime/plugin.ts @@ -74,7 +74,7 @@ export default defineNuxtPlugin(() => { addRouteMiddleware('auth', async (to) => { const {user, authConfig, setBearerToken, setRefreshToken} = await useAuth() - if (to.path === authConfig.redirect.callback) { + if (to.path === authConfig.redirect.callback || to.path === authConfig.redirect.callback + '/') { const queryParams = new URLSearchParams(to.query.toString()); if (queryParams.has('error')) { return navigateTo(authConfig.redirect.login)