Laravel 5 Auth Post Submit - Tokenmismatchexception in Verifycsrftoken.PHP Line 46

TokenMismatchException in VerifyCsrfToken.php Line 67

I'm assuming you added $this->middleware('auth'); inside the constructor of your controller to get the authentication working. In your login/register forms, if you are using {!! Form::someElement !!}, add the following line at the top as well:

{!! csrf_field() !!}

Or if you are using input tags inside your forms, just add the following line after <form> tag:

<input type="hidden" name="_token" value="{{ csrf_token() }}">

Hope this helps.

Laravel 5, Forms, TokenMismatchException in VerifyCsrfToken.php line 46

Internet explorer rejects sessions from domains with an underscore it. This is a known issue.

Please see here: Issue with Session and Cookie in Internet Explorer for websites containing underscore

And also:
http://blogs.msdn.com/b/ieinternals/archive/2009/08/20/wininet-ie-cookie-internals-faq.aspx

TokenMismatchException in VerifyCsrfToken.php line 46 ocassionally showing

We had the exact same problem and never found a good solution. We did find a workaround although.

In your .env file, set the Session storage to Redis (yap, you have to install Redis on your server than). This worked for us, never encountered the same problem again.

Note, this works for us, but it of course is not a solution, merely a work-around until someone found the right solution.



Related Topics



Leave a reply



Submit