Password Reset Flow — Email OTP

Two-page flow: request reset → verify OTP + set new password

Page 1: Forgot Password — Request OTP

/forgot-password
🔒
Forgot your password?
Enter your email and we'll send you a verification code to reset your password.
← Back to sign in

API: Calls authClient.emailOtp.requestPasswordReset({ email }). This triggers the server to send a "forget-password" OTP via the existing sendVerificationOTP handler.

Page 2: Reset Password — OTP + New Password

/reset-password?email=user@example.com
📧
Check your email
We sent a 6-digit code to user@example.com
_
_
_
_
_
_
Resend code in 4:23
then set new password
← Back to sign in

Success State

After successful reset
Password reset successful
Your password has been updated. You can now sign in with your new password.

API Flow

  1. User enters email on /forgot-password
  2. Client calls authClient.emailOtp.requestPasswordReset({ email })
  3. Server sends OTP with type "forget-password" via sendVerificationOTP
  4. User is redirected to /reset-password?email=user@example.com
  5. User enters OTP + new password + confirm password
  6. Client calls authClient.emailOtp.checkVerificationOtp({ email, otp, type: "forget-password" }) (optional validation)
  7. Client calls authClient.resetPassword({ newPassword, otp })
  8. On success: show success screen, then redirect to /login