title: How to Use Laravel Passport Token System
body: <p>I am planning to use Laravel Passport System for the ANGULAR 6 API. Installed as per the documentation.</p>
  <p>But I have a bit of confusion. Please try to Resolve It.</p>
  <p><em><strong>1. How to provide a token ?</strong></em></p>
  <p>This is the Correct Method?</p>
  <pre><code>https://stackoverflow.com/questions/54201827/how-to-use-laravel-passport-access-tokens
  </code></pre>
  <p>OR
  Coding LIKE is correct Method ?:</p>
  <pre><code>$request-&gt;request-&gt;add([
              'username' =&gt; $request-&gt;email,
              'grant_type' =&gt; 'password',
              'client_id' =&gt; env('PASSWORD_CLIENT_ID'),
              'client_secret' =&gt; env('PASSWORD_CLIENT_SECRET'),
              'scope' =&gt; '',
  ]);
  // forward the request to the OAuth token request endpoint and Return Token
  
  $res = Route::dispatch(request()-&gt;create('oauth/token', 'POST', $this-&gt;loginCredentials($request)));
  $this-&gt;api_response = json_decode($res-&gt;getContent());
  return response()-&gt;json(['token' =&gt; $this-&gt;api_response,'usersDetail' =&gt;  $user], 200);
  </code></pre>
  <p><strong>Which Method need to use and Why Please Elaborate it.?</strong></p>
  <p><em><strong>2. How to handle Refresh Token System for Angular?</strong></em></p>
  <p>Like in Refresh (Mouse button Refresh) need to Call Laravel API? How It should be? Please elaborate with Laravel and Angular Codes.</p>
  <p>please answer this question Detaily. looking for a good Answer!!!</p>