title: Laravel 5 oauth2/passport API
body: <p>I've been clawing my eyes out on this and I was wondering if anyone else has experienced this. We are using Laravel 5.4 Passport to handle a SSO. The dev who started this had been developing on a Linux box and since I've taken it over with a Windows box, it's not working. I have dug through the issues on Github for both oauth and passport and haven't seen anything. Here's the summary:</p>
  
  <p>We have a parent application that creates access tokens for the sub applications. I'm able to log into that parent one just fine. When I try to go to a sub department, I get the following error in my parent app laravel log: </p>
  
  <pre><code>2017-11-09 15:24:00] local.ERROR: League\OAuth2\Server\Exception\OAuthServerException: The resource owner or authorization server denied the request. in I:\xampp\htdocs\parentApp\vendor\league\oauth2-server\src\Exception\OAuthServerException.php:168
  Stack trace:
  #0 I:\xampp\htdocs\parentApp\vendor\league\oauth2-
  server\src\AuthorizationValidators\BearerTokenValidator.php(97)
  </code></pre>
  
  <p>I added a log at where the catch gets thrown: </p>
  
  <pre><code>} catch (\RuntimeException $exception) {
          \Log::info(print_r($exception-&gt;getMessage(), true));
          //JWR couldn't be parsed so return the request as is
          throw OAuthServerException::accessDenied('Error while decoding to JSON');
      }
  </code></pre>
  
  <p>And this is what I get:</p>
  
  <pre><code>SQLSTATE[42S02]: Base table or view not found: 1146 Table 'subapplication.oauth_access_tokens' doesn't exist (SQL: select * from `oauth_access_tokens` where `oauth_access_tokens`.`id` = longkey limit 1) 
  </code></pre>
  
  <p>It's trying to find the oauth_access_tokens from the sub application database. We did a walk through with PHPStorm's debugger and it seems to always be looking at the parent's database. It does find the token however it never does authenticate. </p>
  
  <p>Anyone run into this? I appreciate any help in advance!</p>
  
  <p><strong>UPDATE:</strong> After going through using Xdebug, I'm wondering if it's a localhost and cookies issue. I'm getting a request with a status of 200 but then Laravel tries to check cookies and there are no cookies.</p>