feat: add forgot password UI flow
- ForgotPasswordPage: email input, sends reset request, shows success - ResetPasswordPage: reads token from ?token= query param, password + confirm inputs, validates min length, shows success with login link - LoginForm: added [FORGOT PASSWORD?] link below the form - App.tsx: /forgot-password and /reset-password routes (public, no auth) - auth store: requestPasswordReset + resetPassword actions - Backend routes already existed at POST /auth/request-password-reset and POST /auth/reset-password
This commit is contained in:
@@ -116,6 +116,16 @@ export function LoginForm() {
|
||||
: "[LOGIN]"}
|
||||
</button>
|
||||
</form>
|
||||
{!isRegister && (
|
||||
<div className="mt-3 text-center">
|
||||
<Link
|
||||
to="/forgot-password"
|
||||
className="text-gb-yellow hover:text-gb-orange text-xs"
|
||||
>
|
||||
[FORGOT PASSWORD?]
|
||||
</Link>
|
||||
</div>
|
||||
)}
|
||||
{!isRegister && (
|
||||
<div className="mt-3">
|
||||
<button
|
||||
|
||||
Reference in New Issue
Block a user