title: Laravel Passport invalid_credentials on register
body: <p>I have a problem with Passport.
  I have the messages:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>"error": "invalid_credentials",
  "message": "The user credentials were incorrect."</code></pre>
  </div>
  </div>
  </p>
  
  <p>When I try the register or the login.
  Yet the user is still stored in database.
  Here are my codes:
  AuthServiceProvider :</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>&lt;?php
  
  namespace App\Providers;
  
  use Laravel\Passport\Passport;
  use Illuminate\Support\Facades\Gate;
  use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
  use Carbon\Carbon;
  
  class AuthServiceProvider extends ServiceProvider
  {
      /**
       * The policy mappings for the application.
       *
       * @var array
       */
      protected $policies = [
          'App\Model' =&gt; 'App\Policies\ModelPolicy',
      ];
  
      /**
       * Register any authentication / authorization services.
       *
       * @return void
       */
      public function boot()
      {
          $this-&gt;registerPolicies();
  
          Passport::routes();
  
          Passport::tokensExpireIn(Carbon::now()-&gt;addMinutes(1));
  
          Passport::refreshTokensExpireIn(Carbon::now()-&gt;addDays(30));
      }
  }</code></pre>
  </div>
  </div>
  
  RegisterController:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>&lt;?php
  
  namespace App\Http\Controllers\Api\Auth;
  
  use Illuminate\Http\Request;
  //use Illuminate\Routing\Route;
  use Illuminate\Support\Facades\Route;
  use App\Http\Controllers\Controller;
  use App\User;
  use Laravel\Passport\Client;
  
  class RegisterController extends Controller
  {
  
  
   private $client;
  
       public function __construct(){
  
        $this-&gt;client = Client::find(1);
       }
  
  
      public function register(Request $request){
  
  
       $this-&gt;validate($request, [
        'name' =&gt; 'required',
        'email' =&gt; 'required|email|unique:users,email',
        'password' =&gt; 'required|min:6'
       ]);
  
  
       $user = User::create([
        'name' =&gt; request('name'),
        'email' =&gt; request('email'),
        'password' =&gt; bcrypt('password')
        /*'admin' =&gt; isset(request('admin'))*/
       ]);
  
  
       $params = [
        'grant_type' =&gt; 'password',
        'client_id' =&gt; $this-&gt;client-&gt;id,
        'client_secret' =&gt; $this-&gt;client-&gt;secret,
        'username' =&gt; request('email'),
        'passord' =&gt; request('password'),
        'scope' =&gt; '*'
       ];
  
  
       $request-&gt;request-&gt;add($params);
  
       $proxy = Request::create('oauth/token', 'POST');
  
       return Route::dispatch($proxy);
  
      }
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>LoginController:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>&lt;?php
  
  namespace App\Http\Controllers\Api\Auth;
  
  use Illuminate\Http\Request;
  //use Illuminate\Routing\Route;
  use Illuminate\Support\Facades\Route;
  use Illuminate\Support\Facades\Auth;
  use Illuminate\Support\Facades\DB;
  use App\Http\Controllers\Controller;
  use Laravel\Passport\Client;
  
  class LoginController extends Controller
  {
  
  
   //use IssueTokenTrait;
  
  
   private $client;
  
   public function __construct(){
  
    $this-&gt;client = Client::find(1);
    }
  
  
    public function test(){
  
     return 'Tu essaie de te loger !';
    }
  
  
  
      public function login(Request $request){
  
       $this-&gt;validate($request, [
        'username' =&gt; 'required',
        'password' =&gt; 'required'
       ]);
  
  
       $params = [
        'grant_type' =&gt; 'password',
        'client_id' =&gt; $this-&gt;client-&gt;id,
        'client_secret' =&gt; $this-&gt;client-&gt;secret,
        'username' =&gt; request('username'),
        'passord' =&gt; request('password'),
        'scope' =&gt; '*'
       ];
  
  
       $request-&gt;request-&gt;add($params);
  
       $proxy = Request::create('oauth/token', 'POST');
  
       return Route::dispatch($proxy);
  
  
      }
  
  
  
      public function refresh(Request $request){
  
       $this-&gt;validate($request, [
        'refresh_token' =&gt; 'required'
       ]);
  
  
       $params = [
        'grant_type' =&gt; 'refresh_token',
        'client_id' =&gt; $this-&gt;client-&gt;id,
        'client_secret' =&gt; $this-&gt;client-&gt;secret,
        'username' =&gt; request('username'),
        'passord' =&gt; request('password')
       ];
  
  
       $request-&gt;request-&gt;add($params);
  
       $proxy = Request::create('oauth/token', 'POST');
  
       return Route::dispatch($proxy);
  
      }
  
  
  
      public function logout(Request $request){
  
       $accessToken = Auth::user()-&gt;token();
  
       DB::table('oauth_refresh_tokens')
       -&gt;where('access_token_id', $accessToken-&gt;id)
       -&gt;update(['revoked' =&gt; true]);
  
       $accessToken-&gt;revoke();
  
       return response()-&gt;json([], 204);
  
      }
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>So in the case of register, if the data is bad, I get the right messages.
  But when they are good, I receive these two messages:
    "error": "invalid_credentials",
       "message": "The user credentials were incorrect."
  Same in the case of login.
  Can someone help me?</p>