title: JWT Auth Error : The token could not be parsed from the request
body: <p>Currently I'm developing Laravel 5.8 with using JWT Auth, everything running as well in Postman, but when I tried for testing on Browser, I got a lot of errors and one by one has been fixed. Now I'm get another error when I try to pass JSON Web Token by using Request. The token isn't provided correctly. After I do sign in process in :</p>
  
  <pre><code>public function signin(Request $request)
    {
      $this-&gt;validate($request, [
        'username' =&gt; 'required',
        'password' =&gt; 'required'
      ]);
      // grab credentials from the request
      $credentials = $request-&gt;only('username', 'password');
      try {
  
          // attempt to verify the credentials and create a token for the user
          if (! $token = JWTAuth::attempt($credentials)) {
              return response()-&gt;json([
                'error' =&gt; 'Invalid Credentials, username and password dismatches. Or username may not registered.',
                'status' =&gt; '401'
              ], 401);
          }
      } catch (JWTException $e) {
          // something went wrong whilst attempting to encode the token
          return response()-&gt;json(['error' =&gt; 'could_not_create_token'], 500);
      }
      return response()-&gt;json([
        'token'   =&gt; $token
      ]);
    }
  </code></pre>
  
  <p>The token generated successfully. But when I need the token to another controller, the token generated unsuccessfully, one of example is in this method :</p>
  
  <pre><code>  public function index(Request $request)
    {
      // this will set the token on the object
      JWTAuth::parseToken();
      // and you can continue to chain methods
      $user = JWTAuth::parseToken()-&gt;authenticate();
      $token = JWTAuth::getToken();
      die($token);
      try {
          if (! $user = JWTAuth::parseToken()-&gt;authenticate()) {
              return response()-&gt;json(['user_not_found'], 404);
          }
      } catch (Tymon\JWTAuth\Exceptions\TokenExpiredException $e) {
          return response()-&gt;json(['token_expired'], $e-&gt;getStatusCode());
      } catch (Tymon\JWTAuth\Exceptions\TokenInvalidException $e) {
          return response()-&gt;json(['token_invalid'], $e-&gt;getStatusCode());
      } catch (Tymon\JWTAuth\Exceptions\JWTException $e) {
          return response()-&gt;json(['token_absent'], $e-&gt;getStatusCode());
      }
  </code></pre>
  
  <p>Everytime I'd like to <code>JWTAuth::parseToken();</code> I got this error :</p>
  
  <blockquote>
    <p>The token could not be parsed from the request</p>
  </blockquote>
  
  <p>So why this happen? And what should I do? Because In <code>signin</code> method, the token successfully generated, but in <code>index</code> I can't access the token. Thanks for your attention.</p>