Laravel Authenticate user from different website

I have 2 different website. Public facing site is developed in WordPress and project functionality is developed in Laravel.

I have placed login form in WordPress, and trying to do login from wordpress custom form to Laravel project module. but there are issues related to csrf token mismatch.

Read More

Here is the code from wordpress site:

<form role="login" action="">
  <input type="text" name="username" />
  <input type="password" name="password" />
  <input type="submit" name="login" value="Login" />

Is there any way I can authenticate the user from wordpress to Laravel without using any Laravel packages. OR how to stop csrf token validation only for specific route?

I’m using Laravel 5.0 and WordPress 4.4 version.

Related posts


  1. If you are using Laravel 5.1 you can exclude specific routes from the CSRF Middleware. Check the file appHttpMiddlewareVerifyCsrfToken.php

    class VerifyCsrfToken extends BaseVerifier
         * The URIs that should be excluded from CSRF verification.
         * @var array
        protected $except = [

    for all the routes specified in the $except array, the middleware will not be executed

Comments are closed.