【问题标题】:laravel passport doesnt support authorization grant type?laravel 护照不支持授权类型?
【发布时间】:2017-07-27 08:12:22
【问题描述】:

我在使用 laravel/passport 中的授权时遇到问题。我通常会收到此错误:

{"error":"unsupported_grant_type","message":"授权服务器不支持授权授权类型。","hint":"检查grant_type参数"}

首先它需要我进入登录页面,当我登录时它会引发上述错误。但是,密码授予工作正常。

我使用以下方法创建了我的客户端:php artisan passport:client

【问题讨论】:

    标签: laravel oauth-2.0 laravel-passport


    【解决方案1】:

    尝试 body raw 和 Content-Type application/json

    【讨论】:

      【解决方案2】:

      为了使用授权类型“client_credentials”,您需要使用 --client 选项创建您的客户端,如下所示:

      php artisan passport:client --client
      

      Take a look at the Laravel documentation here

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2017-05-14
        • 2017-05-31
        • 1970-01-01
        • 2018-09-26
        • 2017-12-22
        • 2017-09-18
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多