fix: don't apply auth middleware on signin callback (#478)

This commit is contained in:
Daniel Roe 2022-12-20 21:03:15 +00:00 committed by GitHub
parent 2e97780899
commit dfc24370d8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 48 additions and 45 deletions

View file

@ -1,7 +1,7 @@
export default defineNuxtRouteMiddleware((to) => {
if (process.server)
return
if (!currentUser.value)
if (!currentUser.value && to.path !== '/signin/callback')
return navigateTo(`/${currentServer.value}/public`)
if (to.path === '/')
return navigateTo('/home')