Reset Password
{ if (!response.ok) { return response.json().then(data => { throw new Error(data.message || 'HTTP error ' + response.status); }); } return response.json(); }) .then(data => { if (data.success) { success = { show: true, message: data.message }; step = 'verify'; } else { if (data.errors) { let errorMessage = Object.values(data.errors).flat().join(' '); errors = { general: errorMessage }; } else { errors = { general: data.message || 'An error occurred' }; } } loading = false; }) .catch(error => { console.error('Send OTP Error:', error); errors = { general: error.message || 'An error occurred. Please try again.' }; loading = false; }) ">
Username/Email/Phone
Phone Number
Send OTP
Sending...
{ if (!response.ok) { return response.json().then(data => { throw new Error(data.message || 'HTTP error ' + response.status); }); } return response.json(); }) .then(data => { if (data.success) { success = { show: true, message: data.message }; form.reset_token = data.reset_token; step = 'reset'; } else { if (data.errors) { let errorMessage = Object.values(data.errors).flat().join(' '); errors = { general: errorMessage }; } else { errors = { general: data.message || 'Invalid OTP' }; } } loading = false; }) .catch(error => { console.error('OTP Verification Error:', error); errors = { general: error.message || 'An error occurred. Please try again.' }; loading = false; }) ">
Enter the 4-digit OTP sent to your phone
OTP Code
Back
Verify OTP
Verifying...
{ if (!response.ok) { return response.json().then(data => { throw new Error(data.message || 'HTTP error ' + response.status); }); } return response.json(); }) .then(data => { if (data.success) { success = { show: true, message: data.message }; setTimeout(() => window.location.href = 'https://ebsssacco.com/login', 2000); } else { if (data.errors) { let errorMessage = Object.values(data.errors).flat().join(' '); errors = { general: errorMessage }; } else { errors = { general: data.message || 'Password reset failed' }; } } loading = false; }) .catch(error => { console.error('Password Reset Error:', error); errors = { general: error.message || 'An error occurred. Please try again.' }; loading = false; }) ">
Enter your new password
New Password
Confirm New Password
Update Password
Updating...
Back to Login