Laravel 6护照在错误的凭据上返回400错误的请求

问题描述 投票:3回答:1

我将Laravel 6护照授权密码用于我的Vue后端。

当我向oauth / token]发送正确的凭据时,它可以工作并返回令牌,但是当我发送错误的消息(电子邮件/密码)时,它返回400,而不是401,带有此消息。

    {
    "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."
}

我检查了client_id

client_secret

我用新安装的Laravel

+ passport进行了测试,没有一行代码,Laravel 5.8返回401没问题,但是Laravel 6返回了400个错误请求。

你有什么主意吗?

我将Laravel 6护照授权密码用于我的Vue后端。当我向oauth / token发送正确的凭据时,它可以工作并返回令牌,但是当我发送错误的(电子邮件/密码)时,它将返回400,而不是...

laravel oauth-2.0 laravel-passport laravel-6
1个回答
0
投票

最后我发现了问题,问题出在Laravel护照所使用的league / oauth2-server

© www.soinside.com 2019 - 2024. All rights reserved.