If I switch the server to a https connection the error doesn't exist. Any idea?
Yes, switch to https. What possible reason could you have to want to authenticate users over http?
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I am using Ubuntu server 16.04 on DigitalOcean, Nginx as my webserver, Laravel 5.2
I am facing a problem when trying to log in at my admin panel that I have created. This problem happened when I changed my connection from HTTPS( I have blocked the https with UFW firewall) to HTTP.
TokenMismatchException in compiled.php line 3227
Before switching to HTTPS it has worked with HTTP too, but that was before 3 months ago.
I have done the following:
php artisan config:clear
php artisan route:clear
php artisan clear-compiled
and have redone :
php artisan config:cache
php artisan route:cache
php artisan optimize --force
I deleted the sessions at the storage/framework/sessions But the problem still persists.
My signin form is as below:
<form action="{{ route('signin') }}" method="post">
<div class="input-group">
<label for="email">E-Mail</label>
<input type="email" id="email" name="email" class="form-control">
</div>
<div class="input-group">
<label for="password">Password</label>
<input type="password" id="password" name="password" class="form-control" autocomplete="off">
</div>
{{ csrf_field() }}
<button type="submit" class="btn btn-success">Sign In</button>
</form>
If I switch the server to a https connection the error doesn't exist. Any idea?
Please or to participate in this conversation.