diff --git a/pages/auth/login.vue b/pages/auth/login.vue index 5980f14..2d9a612 100644 --- a/pages/auth/login.vue +++ b/pages/auth/login.vue @@ -10,6 +10,7 @@ unauthenticatedOnly: true, navigateAuthenticatedTo: "/", }, + middleware: ["auth"], }); const formState = reactive({ @@ -23,6 +24,10 @@ let reso: any; try { reso = await signIn(values); + + await navigateTo({ + path: "/", + }); } catch (e: any) { if (e.data) { notification["error"]({ @@ -30,24 +35,20 @@ }); } } - - await navigateTo({ - path: "/", - }); };