Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(web): logout and clear user store when using back button on the change password form #6288

Merged
merged 1 commit into from
Jan 9, 2024

Conversation

alextran1502
Copy link
Contributor

Fixes #6275

Copy link

cloudflare-pages bot commented Jan 9, 2024

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: eae62d9
Status: ✅  Deploy successful!
Preview URL: https://5c1477d5.immich.pages.dev
Branch Preview URL: https://fix-6275.immich.pages.dev

View logs

Comment on lines +14 to +17
if (from?.url.pathname === AppRoute.AUTH_CHANGE_PASSWORD) {
resetSavedUser();
await api.authenticationApi.logout();
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TBF this should probably be done during the change password process, no? It feels a bit weird to handle it here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is here to handle the case where the user navigate back, using the back button on the browser before changing the password

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh before changing the actual password... I see

@alextran1502 alextran1502 merged commit 8d1287e into main Jan 9, 2024
19 of 20 checks passed
@alextran1502 alextran1502 deleted the fix-6275 branch January 9, 2024 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Login workflow authenticates incorrect user
2 participants