Search code examples
phplaravellaravel-passport

laravel passport doesn't support authorization_code grant type?


These are the fields that I am posting to /oauth/token from postman but the response is:


##

grant_type:authorization_code

client_id:12

client_secret:WXIfywkQvyHzjrR17sm0xQ72sPr8T6FUDSRPJrkL

code:WF3dQHx7Wr2Ly5UsK/r8TVgKqu6hmjfDaQnNKbHR3wJjuPiHsUPqVgmN45cMQKmopFH7zAm0vXTn5LhMms/19WOu2diV5r04T8Y7HidiWAFDObYCGkW2a3Iaa1KG8Y26EyfYtbhhP+hk87pd12s7S03ZUSqXVcuyFnkW6ip3Up1G+MDQP8htUqu5/cmq2zpRDLCjJZga3PIGFIglWgttcg9lYbVBG5q90FpQk4BMF4KrlOSJSU/73AQvOrtecety1xUvtNU2n2hxiNA4YbSMhQK0SIGFSSjd7EjAS6LZON7WLPLYKgExKCgYwx5ZmsZrQr3/0VP2dyH0/7o+bOEEO054xyB2K07UfBPtg6eobUGY19Vl5kUrIaOIp0EcNnTOiycOEQqIoHzKPLNSPTfvzd1jc6F1LfEJbzzXgEmI1OAfi2VVUduRBxBmqh1lFGFHfWbKD3ipNIBsNGhvvXcw2An7iMMlxDYv+AqUGVfa0mho+Qv19EG3ZTaHs8ykE5aGFoKSOWiDeABXhnUWhHHFJ39WJDL4yWDAhO2u9LFGvEhbOHjYXDAkp5B+wbtWLpoxgyvbmlMJ8Kl77ABVKE6cxk7khjTK7XoFIMVC+zdqVireZpbBja81eEFgUoGPmKIrX/ksp+9CQ9/J3CfZUQWaZO5LVybSo3JYFUwkWYtoNcY=%

redirect_uri:http://site.dzangocart.dev/profile

what i am missing here?


Solution

  • When visiting the endpoint using Postman, set the Header Accept: application/json or Laravel Passport would never know it's an API client . check

    https://scotch.io/@neo/getting-started-with-laravel-passport