Skip to content

Commit 8cbe629

Browse files
hiroki-otakaHiroki Otakazoey-kaiser
authored
fix(#792): do not block login page for refresh provider (#814)
Co-authored-by: Hiroki Otaka <hiroki.otaka@gmail.com> Co-authored-by: Zoey <zoeykaiser8@gmail.com>
1 parent 53a50f4 commit 8cbe629

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/runtime/middleware/auth.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ export default defineNuxtRouteMiddleware((to) => {
6666
return
6767
}
6868

69-
// We do not want to block the login page when the local provider is used
70-
if (authConfig.provider?.type === 'local') {
69+
// We do not want to block the login page when the local/refresh provider is used
70+
if (authConfig.provider?.type === 'local' || authConfig.provider?.type === 'refresh') {
7171
const loginRoute: string | undefined = authConfig.provider?.pages?.login
7272
if (loginRoute && loginRoute === to.path) {
7373
return

0 commit comments

Comments
 (0)