From 494a55ec7b001d1eab40f13b2f06364ed746c3d2 Mon Sep 17 00:00:00 2001 From: chloe Date: Thu, 19 Mar 2026 21:51:38 +0000 Subject: [PATCH] fix --- Seasoned.Frontend/app/pages/login.vue | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Seasoned.Frontend/app/pages/login.vue b/Seasoned.Frontend/app/pages/login.vue index 6c811ef..d7e28da 100644 --- a/Seasoned.Frontend/app/pages/login.vue +++ b/Seasoned.Frontend/app/pages/login.vue @@ -145,16 +145,16 @@ const handleAuth = async () => { authLoading.value = true const endpoint = isLogin.value ? 'api/auth/login' : 'api/auth/register' - const url = `${config.public.apiBase}${endpoint}` + const url = isLogin.value + ? `${config.public.apiBase}${endpoint}?useCookies=true&useSessionCookies=false` + : `${config.public.apiBase}${endpoint}` try { const response = await $fetch(url, { method: 'POST', body: { email: email.value, - password: password.value, - useCookies: true, - useSessionCookies: false + password: password.value }, credentials: 'include' }) @@ -162,7 +162,6 @@ const handleAuth = async () => { if (isLogin.value) { isLoggedIn.value = true navigateTo('/') - } else { isLogin.value = true authLoading.value = false @@ -171,7 +170,6 @@ const handleAuth = async () => { confirmPassword.value = '' } } catch (err) { - authLoading.value = false if (err.status === 401) { errorMessage.value = "Invalid email or password. Please try again."