title: Trying to get property 'id' of non-object on passport after createToken()
body: <p>when i using passport package After doing this,</p>
  
  <pre><code>$success['token'] =  $users-&gt;createToken('MyApp')-&gt;accessToken;
  </code></pre>
  
  <p>I'll deal with error in this code :</p>
  
  <pre><code>  protected function createRequest($client, $userId, array $scopes)
  {
      return (new ServerRequest)-&gt;withParsedBody([
          'grant_type' =&gt; 'personal_access',
          'client_id' =&gt; $client-&gt;id,
          'client_secret' =&gt; $client-&gt;secret,
          'user_id' =&gt; $userId,
          'scope' =&gt; implode(' ', $scopes),
      ]);
  }
  </code></pre>
  
  <p>text of error : </p>
  
  <pre><code>Trying to get property 'id' of non-object
  </code></pre>
  
  <p>why clinet variabale has null ??</p>