From 798dcf3f760a6ee72a2ca6a47e0ed94cf68717ed Mon Sep 17 00:00:00 2001 From: ColinBuyck Date: Mon, 18 Dec 2023 15:24:41 -0800 Subject: [PATCH] fix: force users to resign-in --- shared-helpers/src/AuthContext.ts | 11 ++++++----- sites/partners/src/pages/reset-password.tsx | 6 +++--- sites/public/src/pages/reset-password.tsx | 6 +++--- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/shared-helpers/src/AuthContext.ts b/shared-helpers/src/AuthContext.ts index 74e6f93f1d..65c813518b 100644 --- a/shared-helpers/src/AuthContext.ts +++ b/shared-helpers/src/AuthContext.ts @@ -317,11 +317,12 @@ export const AuthProvider: FunctionComponent = ({ child }) if (response) { dispatch(saveToken({ accessToken: response.accessToken, apiUrl, dispatch })) - const profile = await userService?.userControllerProfile() - if (profile) { - dispatch(saveProfile(profile)) - return profile - } + // 12/18 - Short-term error fix to allow user accesss + // const profile = await userService?.userControllerProfile() + // if (profile) { + // dispatch(saveProfile(profile)) + // return profile + // } } return undefined } finally { diff --git a/sites/partners/src/pages/reset-password.tsx b/sites/partners/src/pages/reset-password.tsx index 9b53dc4a1a..8f7c179fe2 100644 --- a/sites/partners/src/pages/reset-password.tsx +++ b/sites/partners/src/pages/reset-password.tsx @@ -31,9 +31,9 @@ const ResetPassword = () => { const { password, passwordConfirmation } = data try { - const user = await resetPassword(token.toString(), password, passwordConfirmation) - setSiteAlertMessage(t(`authentication.signIn.success`, { name: user.firstName }), "success") - await router.push("/") + await resetPassword(token.toString(), password, passwordConfirmation) + setSiteAlertMessage(t(`account.settings.passwordSuccess`), "notice") + await router.push("/sign-in") window.scrollTo(0, 0) } catch (err) { const { status, data } = err.response || {} diff --git a/sites/public/src/pages/reset-password.tsx b/sites/public/src/pages/reset-password.tsx index f2892e8de7..41ac340aa9 100644 --- a/sites/public/src/pages/reset-password.tsx +++ b/sites/public/src/pages/reset-password.tsx @@ -40,9 +40,9 @@ const ResetPassword = () => { const { password, passwordConfirmation } = data try { - const user = await resetPassword(token.toString(), password, passwordConfirmation) - setSiteAlertMessage(t(`authentication.signIn.success`, { name: user.firstName }), "success") - await router.push("/account/dashboard") + await resetPassword(token.toString(), password, passwordConfirmation) + setSiteAlertMessage(t(`account.settings.passwordSuccess`), "notice") + await router.push("/sign-in") } catch (err) { const { status, data } = err.response || {} if (status === 400) {