lubusIN / laravel-email-verification-app-boilerplate

Laravel app boilerplate with email verification process on registration

Home Page:http://www.lubus.in/blog/adding-email-verification-in-laravel-5-3-app-149

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Token Mismatch Exception on Login after verification

MAsifOfficial opened this issue · comments

Hi!
When a user registers & then clicks the verification link, he gets redirected to login page after being verified. But when he tries to login, ToeknMismatchException is raised.

@MAsifOfficial

  • Your sessions are not being set properly. The CSRF token works by flashing the value to your session, then comparing the value with what was submitted with your form on the next request. If your sessions are not being set then this will always fail.
  • They are not being set properly because the directory storage/framework/sessions is not writable. Laravel needs the storage & bootstrap\cache dir as writable.
  • To make them writable use the following commands on *nix based OSs:
sudo chgrp -R www-data storage bootstrap/cache
sudo chmod -R ug+rwx storage bootstrap/cache

You can re-open the issue if the problem persists :)