whisper-money/resources/js/pages/auth
Víctor Falcón f4bbbfd767
fix(auth): prevent FormData crash on successful login (#503)
## What

Removes `resetOnSuccess={['password']}` from the login form.

## Sentry

- Fixes PHP-LARAVEL-2Y — `TypeError: Failed to construct 'FormData':
parameter 1 is not of type 'HTMLFormElement'.` (6 users, on `/login`)

## Root cause

On a successful login the server redirects to the dashboard, which
**unmounts the login form**. `resetOnSuccess` then fires a form reset,
and Inertia's reset handler constructs `new FormData(ref)` from the form
ref — now stale/null — which throws.

The reset serves no purpose on login (the user navigates away
regardless), so removing it eliminates the crash.

## Tests

- Added `resources/js/pages/auth/login.test.tsx`: renders the login page
and asserts the `<Form>` is not configured to reset on success.
2026-06-08 09:03:15 +02:00
..
confirm-password.tsx feat: Spanish localization (#74) 2026-02-08 11:58:08 +01:00
forgot-password.tsx feat: Spanish localization (#74) 2026-02-08 11:58:08 +01:00
login.test.tsx fix(auth): prevent FormData crash on successful login (#503) 2026-06-08 09:03:15 +02:00
login.tsx fix(auth): prevent FormData crash on successful login (#503) 2026-06-08 09:03:15 +02:00
register.tsx feat(auth): show/hide toggle on password fields (#499) 2026-06-06 11:42:20 +02:00
reset-password.tsx feat(auth): show/hide toggle on password fields (#499) 2026-06-06 11:42:20 +02:00
setup-encryption.tsx feat: Spanish localization (#74) 2026-02-08 11:58:08 +01:00
two-factor-challenge.tsx typo: Add missing space (#339) 2026-04-27 07:59:45 +01:00
verify-email.tsx feat: Spanish localization (#74) 2026-02-08 11:58:08 +01:00