dusterio / lumen-passport

Making Laravel Passport work with Lumen
MIT License
654 stars 139 forks source link

it always return invalid_client #139

Closed MohameedElsaeid closed 2 years ago

MohameedElsaeid commented 4 years ago

Request Method : POST Url : v1/oauth/token Request Body { "grant_type":"password", "client_id":1, "client_secret":"mRPVkQlA3tgHPC2IWA8334ozF52QaIdII4YMGz3D", "password":"123456", "scope":"" }

Response :

{ "error": "invalid_client", "error_description": "Client authentication failed", "message": "Client authentication failed" }

User Model `class User extends Model implements AuthenticatableContract, AuthorizableContract { use Authenticatable, Authorizable, HasApiTokens;

protected $table = 'users';
/**
 * The attributes that are mass assignable.
 *
 * @var array
 */
protected $fillable = [
    'user_id',
    'user_name',
    'user_email',
    'user_password',
];

/**
 * The attributes excluded from the model's JSON form.
 *
 * @var array
 */
protected $hidden = [
    'user_password',
];

} `

onedirection5 commented 4 years ago

Request Method : POST Url : v1/oauth/token Request Body { "grant_type":"password", "client_id":1, "client_secret":"mRPVkQlA3tgHPC2IWA8334ozF52QaIdII4YMGz3D", "password":"123456", "scope":"" }

Response :

{ "error": "invalid_client", "error_description": "Client authentication failed", "message": "Client authentication failed" }

User Model `class User extends Model implements AuthenticatableContract, AuthorizableContract { use Authenticatable, Authorizable, HasApiTokens;

protected $table = 'users';
/**
 * The attributes that are mass assignable.
 *
 * @var array
 */
protected $fillable = [
    'user_id',
    'user_name',
    'user_email',
    'user_password',
];

/**
 * The attributes excluded from the model's JSON form.
 *
 * @var array
 */
protected $hidden = [
    'user_password',
];

} `

I have the same problem here. Always return invalid_client. I'm stuck here for days. Can anyone please help us to solved this problem?

pat22292 commented 4 years ago

up, having the same error,

federicoalonso commented 3 years ago

I could solve this problem by runing:

and using this client for password verifications