"419 Page Expired" error when logging into the Control Panel
There are a few common reasons why you might encounter a "419 Page Expired" error when attempting to login to the Control Panel.
Database session driver
The most common reason you'll see this error is if you're using the database
session driver.
The user_id
column on the sessions
table expects an integer value. However, because Statamic uses UUIDs for user IDs, the session row is saved incorrectly, causing the 419 error.
You can workaround this by changing the user_id
column to a string/varchar:
Schema::create('sessions', function (Blueprint $table) { $table->string('id')->primary(); $table->foreignId('user_id')->nullable()->index(); $table->string('user_id')->nullable()->index(); $table->string('ip_address', 45)->nullable(); $table->text('user_agent')->nullable(); $table->longText('payload'); $table->integer('last_activity')->index();});
Browser Autofill
Another potential cause for this issue might be interference by your browser's autocomplete, or an extension which provides similar functionality (like 1Password).
When it autocompletes your login details, it might also be changing the value of the hidden _token
input, which is used for storing your CSRF token.
To rule this out, you could try disabling all browser extensions, or logging in to the Control Panel using a different browser.
Docs Feedback
Submit improvements, related content, or suggestions through Github.
Betterify this page