From 905a8f2f56ef4665a4969f2c620f44dba01a8cce Mon Sep 17 00:00:00 2001 From: Mplan Date: Sun, 31 May 2026 16:12:52 +0800 Subject: [PATCH] fix: keep users signed in after password reset --- src/views/auth/ResetPasswordView.vue | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/views/auth/ResetPasswordView.vue b/src/views/auth/ResetPasswordView.vue index 82c6303..4580f6c 100644 --- a/src/views/auth/ResetPasswordView.vue +++ b/src/views/auth/ResetPasswordView.vue @@ -49,7 +49,7 @@ function startCountdown() { countdown.value-- if (countdown.value <= 0) { if (countdownTimer) clearInterval(countdownTimer) - router.push('/login') + router.push('/') } }, 1000) } @@ -92,7 +92,6 @@ async function handleResetPassword() { const { error: updateError } = await supabase.auth.updateUser({ password: password.value }) if (updateError) throw updateError - await supabase.auth.signOut() window.history.replaceState(null, '', window.location.pathname) countdown.value = 5 state.value = 'success' @@ -124,12 +123,12 @@ onUnmounted(() => { v-if="state === 'success'" status="success" title="密码已重置" - description="现在可以使用新密码登录。" + description="你已使用新密码完成更新,正在返回地图页。" >