From 7378e83b2102bbc4c5e7d0ee6b9e3f471a46f888 Mon Sep 17 00:00:00 2001 From: renatoka Date: Sun, 9 Mar 2025 16:15:23 +0100 Subject: [PATCH 1/2] fix: stringify token upon registration --- src/Pages/Auth/Register/Register.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Pages/Auth/Register/Register.jsx b/src/Pages/Auth/Register/Register.jsx index 9f93cc821..67968c83f 100644 --- a/src/Pages/Auth/Register/Register.jsx +++ b/src/Pages/Auth/Register/Register.jsx @@ -239,7 +239,7 @@ const Register = ({ isSuperAdmin }) => { const action = await dispatch(register(registerForm)); if (action.payload.success) { const authToken = action.payload.data; - localStorage.setItem("token", authToken); + localStorage.setItem("token", JSON.stringify(authToken)); navigate("/uptime"); createToast({ body: "Welcome! Your account was created successfully.", From a4e07621282303677303a23b4c728dc293ddbfdd Mon Sep 17 00:00:00 2001 From: renatoka Date: Mon, 10 Mar 2025 18:24:36 +0100 Subject: [PATCH 2/2] fix: remove usage of local storage for token --- src/Pages/Auth/Register/Register.jsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Pages/Auth/Register/Register.jsx b/src/Pages/Auth/Register/Register.jsx index 67968c83f..00c5998cb 100644 --- a/src/Pages/Auth/Register/Register.jsx +++ b/src/Pages/Auth/Register/Register.jsx @@ -239,7 +239,6 @@ const Register = ({ isSuperAdmin }) => { const action = await dispatch(register(registerForm)); if (action.payload.success) { const authToken = action.payload.data; - localStorage.setItem("token", JSON.stringify(authToken)); navigate("/uptime"); createToast({ body: "Welcome! Your account was created successfully.",