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

bugfix: fix/password-recovery-redirect #1176

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
bugfix: Ensure password reset form validates and updates correctly
- Refactored setPassword function to properly validate password and confirm password fields before submitting.
- Added consistent error handling for password reset and recovery flows.
- Improved user feedback messages for success and error scenarios.
- Updated password reset form UI to enhance usability and clarity.
  • Loading branch information
nickaldwin committed Jul 4, 2024
commit f9750adcf2676309809e985f2ae04078326b7178
5 changes: 4 additions & 1 deletion src/routes/recover/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@

async function setPassword() {
try {
if (!password || !confirmPassword) {
throw new Error('Please enter both password and confirm password');
}
if (password !== confirmPassword) {
throw new Error('Passwords do not match');
}
Expand All @@ -59,7 +62,7 @@
} catch (error) {
addNotification({
type: 'error',
message: error.message
message: error.message || 'Failed to update password'
});
}
}
Expand Down
Loading