title: How can I use Laravel Sanctum in a distributed system?
body: <p>I need to use Laravel Sanctum in a distributed system, for this case, I have 3 participants:</p>
  <ol>
  <li>The user</li>
  <li>The API server</li>
  <li>The authentication server</li>
  </ol>
  <p>The authentication server is only for generate and validate tokens, the API must make the authentication by calling to the authentication server and sending the token in the authorization header of the request. This token it's sent by the user when calling the API (the user had to make a request for a token to the authentication server before)</p>
  <p>I want to use Laravel 8 in the API server and also, I want to use Laravel 8 in the authentication server, I know that I can use Laravel Sanctum to handle the API authentication, but it has to be in the same server that the API is in, the middleware <code>auth:sanctum</code> works by searching the token in the same database that the API is in, but now I need that the middleware search the token in the authentication server who has another Laravel with another database, how can I do that? Do I need to do it manually?</p>