I get this error when I try to use authentication in Laravel 5.2. This happened after switching to a live server. On my local server everything is working fine.
The token inside the form and Session: token () are the same.
UPD: I put dd ($ request) in laravel / framework / src / Illuminate / Foundation / Http / Middleware / VerifyCsrfToken.php
and the value of _token does NOT match the input of _token on the form.
I did my best:
- Disable CSRF for authentication routes, add routes to the array, except for the array in Midd / VerifyCsrfToken.php.
- Set 777 permissions on the / storage / bootstrap folders.
- Used {!! csrf_field () !!} and name = "_ token" value = "{{csrf_token ()}}" ">.
- Changed domain in config / session.php.
- Php artisan key: generate.
- Reinstalled Auth. Also routes where I have middleware = auth.basic. I get "Invalid credentials" without even asking first about login.
On my local server everything is working fine.
zm_fans
source share