title: Laravel Passport invalid refresh token - token is not linked to client
body: <p>I'm using Passport on Laravel 5.5, receiving error when trying to refresh access token - <em>only on production server</em> - local dev environment works fine!</p>
  
  <p>This is the error returned:</p>
  
  <pre><code>{
  "error": "invalid_request",
  "message": "The refresh token is invalid.",
  "hint": "Token is not linked to client"
  }
  </code></pre>
  
  <p>I've verified that the tokens and clients exist on the database, are not expired, have not been revoked, are stored correctly etc.</p>
  
  <p>Because the system is a multi-tenant system (with each tenant having it's own database) I did not create passport clients using the command</p>
  
  <pre><code>php artisan passport:client
  </code></pre>
  
  <p>instead I copied the passport <code>oauth_clients</code> table and contents for each tenant - so that each tenant uses the same client credentials for eg logging in from frontend, logging in from app (but with different endpoints).</p>
  
  <p>I'm at a loss as to why it's working fine on my local machine but not production.</p>
  
  <p>Does anyone know what exactly <code>php artisan passport:client</code> does besides creating a row in <code>oauth_clients</code> table?</p>
  
  <p>I'm thinking that perhaps something more than just copying the <code>oauth_clients</code> table contents is needed..</p>
  
  <p>Any advice appreciated! Thanks</p>