Skip to content

Commit

Permalink
fix: force users to resign-in (#1647)
Browse files Browse the repository at this point in the history
* fix: force users to resign-in

* fix: unrelated testing fix
  • Loading branch information
ColinBuyck authored Dec 19, 2023
1 parent 7c0ca1c commit 55b482a
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 13 deletions.
11 changes: 6 additions & 5 deletions shared-helpers/src/AuthContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -317,11 +317,12 @@ export const AuthProvider: FunctionComponent<React.PropsWithChildren> = ({ 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 {
Expand Down
4 changes: 2 additions & 2 deletions sites/partners/cypress/e2e/listing.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,8 @@ describe("Listing Management Tests", () => {
}, [] as fillFromFieldOption[])
)

cy.get("#longitude").contains("-122.40078")
cy.get("#latitude").contains("37.79006")
cy.get("#longitude").contains("-122.40")
cy.get("#latitude").contains("37.79")
cy.get("#unitTable").contains("Unit Type")
cy.getByID("waitlist.openQuestion").contains("No")
cy.get("#digitalApplication").contains("Yes")
Expand Down
6 changes: 3 additions & 3 deletions sites/partners/src/pages/reset-password.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 || {}
Expand Down
6 changes: 3 additions & 3 deletions sites/public/src/pages/reset-password.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 55b482a

Please sign in to comment.