From 5f339323c3eec54b7092105936157f8cfd7b649b Mon Sep 17 00:00:00 2001 From: Daniel Cojocea Date: Mon, 12 Aug 2024 15:44:56 -0400 Subject: [PATCH] Final auth design and removed email from session storage upon navigation to /login --- Client/src/Pages/Auth/CheckEmail.jsx | 9 ++-- Client/src/Pages/Auth/ForgotPassword.jsx | 9 ++-- .../src/Pages/Auth/NewPasswordConfirmed.jsx | 52 ++++++++----------- 3 files changed, 34 insertions(+), 36 deletions(-) diff --git a/Client/src/Pages/Auth/CheckEmail.jsx b/Client/src/Pages/Auth/CheckEmail.jsx index bdf4974a0..88a4afa1f 100644 --- a/Client/src/Pages/Auth/CheckEmail.jsx +++ b/Client/src/Pages/Auth/CheckEmail.jsx @@ -79,6 +79,11 @@ const CheckEmail = () => { } }; + const handleNavigate = () => { + sessionStorage.removeItem("email"); + navigate("/login"); + }; + return ( { { - navigate("/login"); - }} + onClick={handleNavigate} sx={{ userSelect: "none" }} > Log In diff --git a/Client/src/Pages/Auth/ForgotPassword.jsx b/Client/src/Pages/Auth/ForgotPassword.jsx index 60c8da190..e1f6ae56e 100644 --- a/Client/src/Pages/Auth/ForgotPassword.jsx +++ b/Client/src/Pages/Auth/ForgotPassword.jsx @@ -81,6 +81,11 @@ const ForgotPassword = () => { else delete errors.email; }; + const handleNavigate = () => { + sessionStorage.removeItem("email"); + navigate("/login"); + }; + return ( { { - navigate("/login"); - }} + onClick={handleNavigate} sx={{ userSelect: "none" }} > Log In diff --git a/Client/src/Pages/Auth/NewPasswordConfirmed.jsx b/Client/src/Pages/Auth/NewPasswordConfirmed.jsx index 5bb9d57d9..12a6995f9 100644 --- a/Client/src/Pages/Auth/NewPasswordConfirmed.jsx +++ b/Client/src/Pages/Auth/NewPasswordConfirmed.jsx @@ -57,46 +57,38 @@ const NewPasswordConfirmed = () => { }, }, }} - > + > + + + + Password reset + + Your password has been successfully reset. Click below to log in + magically. + + +