From da03252ef9f0ff0baf48162e7b063bd1ae1807c9 Mon Sep 17 00:00:00 2001 From: yvettenyibuka Date: Thu, 19 Mar 2026 11:32:03 +0200 Subject: [PATCH] Fixing redirection to home after setting account password --- app/auth/set-account-password/page.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/auth/set-account-password/page.tsx b/app/auth/set-account-password/page.tsx index 6cda08d..576391b 100644 --- a/app/auth/set-account-password/page.tsx +++ b/app/auth/set-account-password/page.tsx @@ -48,6 +48,9 @@ const SetAccountPasswordContent: React.FC = () => { setConfirmPassword(''); message.success(response.data.message || 'Password set successfully'); setTimeout(() => { + // Clear any existing token to force user to log in with new password + localStorage.removeItem('authToken'); + sessionStorage.removeItem('authToken'); router.replace('/auth/login'); }, 800); } catch (error: unknown) {