Skip to content

Error code on bad credentials in password grant type #1101

@yebor974

Description

@yebor974
  • Passport Version: 8
  • Laravel Version: 6.2
  • PHP Version: 7.2
  • Database Driver & Version: pgsql 12

Description:

When i send bad credentials (username or password) to the oauth/token route, i receive a invalig_grant error (HTTP status 400 bad request). ? Why not receive a 401 status code

Response in error:
{ "error": "invalid_grant", "error_description": "The provided authorization grant (e.g., authorization code, resource owner credentials) or refresh token is invalid, expired, revoked, does not match the redirection URI used in the authorization request, or was issued to another client.", "hint": "", "message": "The provided authorization grant (e.g., authorization code, resource owner credentials) or refresh token is invalid, expired, revoked, does not match the redirection URI used in the authorization request, or was issued to another client." }

When i put valid username or password i receive a good token.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions