title: Why Bearer Token not working on my server?
body: <p>I have a problem with authentication. My Laravel 7 project uses a Bearer Token. On localhost it works fine. But on production server <strong>$user = auth('api')-&gt;user();</strong> returns null.</p>
  <p>My step 1: login to the server and get the token (success on localhost and production) via Postman.
  My step 2: Input token in Bearer Token field in Postman
  My step 3: Send some GET request to the server with Bearer Token. On localhost - OK, on production - &quot;user not found&quot;.</p>
  <p>Code on localhost and server is same. What is difference between localhost and server?</p>