Skip to content
Advertisement

How to debug 419 error on LoginPage in Laravel? (Not using AJAX)

Each time I try to login into my Laravel app I get 419 error, thou I have @csrf inside my form tag.

<form method="POST" action="{{ route('login') }}" class="form-auth-small m-t-20">
    @csrf
    //rest of code...
</form>

I read thru all topics on StackOverflow, but mostly I saw cache: clear and key: generate suggestions, which are not helping me. Also, I’ve cleaned my browser hundreds of times.

Once again it happens on the standart login page and master.blade.php has <meta name="csrf-token" content="{{ csrf_token() }}">.

Here is what I see in my dev console enter image description here

UPDATE 2: I noticed that a new session file is generated on each request because my cookies are always empty.enter image description here

Advertisement

Answer

🙁 It was whitespace before <? in one of config file

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement