Skip to content

Authentication pages do not handle 419 status code properly #6893

@vitaliyb

Description

@vitaliyb
  • Laravel Version: 10.40.0
  • Nova Version: 4.34.3
  • PHP Version: 8.2

Description:

If the login page remains open longer than the session lifetime, submitting the form results in a 419 status code. This response is not handled by the frontend, so the user receives no feedback or indication of what went wrong or what action they should take.

Detailed steps to reproduce the issue on a fresh Nova installation:

Scenario

  1. Set SESSION_LIFETIME=1 in .env
  2. php artisan config:clear
  3. Open the login page or the forgot password page
  4. Wait 1 minute
  5. Submit the form

Result

  1. Illuminate\Session\TokenMismatchException is thrown
  2. The frontend does not notify the user — the form remains open with no errors shown

Expected Result

  1. Illuminate\Session\TokenMismatchException is thrown
  2. The frontend catches the 419 status code
  3. The frontend (optionally) reloads the page to obtain a new CSRF token and displays a validation error like: "Your session has expired. Please reload the page and try again."

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugVerified bug by the Nova team

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions