jeudi 27 octobre 2016

TokenMismatchException in VerifyCsrfToken.php line 67 only on live server

I'm getting this error when I try to use auth in Laravel 5.2. That had happened after moving to live server. On my local server everything works fine.

Token inside form and is Session:token() are the same.

UPD: I put dd($request) in laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php

and the _token value NOT matches _token input that is in form.

I tried:

  • Disable CSRF for auth routes, added routes in except array in Midd/VerifyCsrfToken.php.
    • Set up 777 rights to /storage /bootstrap folders.
    • Used {!! csrf_field() !!} and name="_token" value="">.
    • Changed domain in config/session.php.
    • php artisan key:generate.
    • Re-installed Auth. Also routes where I have middleware = auth.basic I'm getting "Invalid credentials" even without asking to log in at first.

On my local server it works fine.

Thanks



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2fajoeJ
via IFTTT

Aucun commentaire:

Enregistrer un commentaire