Laravel 419 Page Expired (CSRF Token / Session Domain Mismatch)
Missing `@csrf` blade directive, expired session, or wrong `SESSION_DOMAIN` behind HTTPS proxy.
Runs locally in browser
Free · No login
Independently Verified 2026-11-25
v4.1.0
Identifier: Laravel 419 Page Expired (CSRF Token / Session Domain Mismatch)
Platform: PHP
Common Root Causes:
- Missing `@csrf` blade directive, expired session, or wrong `SESSION_DOMAIN` behind HTTPS proxy.
Interactive Diagnostic Checklist
Verified Solutions:
- Include `@csrf` in forms, configure `TrustProxies`, and verify `SESSION_SECURE_COOKIE` / `SESSION_DOMAIN`.
Safe Diagnostic Command:
php artisan config:show session
Warning: Verify configuration changes in staging or with dry-run flags (e.g. nginx -t) before reloading production services.
Technical Explanation
Missing `@csrf` blade directive, expired session, or wrong `SESSION_DOMAIN` behind HTTPS proxy. Recommended diagnostic: `php artisan config:show session`. Remediation: Include `@csrf` in forms, configure `TrustProxies`, and verify `SESSION_SECURE_COOKIE` / `SESSION_DOMAIN`.
Worked Examples
- Run `php artisan config:show session` to verify root cause before applying the remediation.
Limitations & Assumptions
- Always verify configuration changes in staging or with dry-run flags (e.g. `nginx -t`) before reloading production services.
Source References & Verification
Resource ID: err-laravel-419-page-expired-csrf · Independently verified: 2026-11-25