Laravel passport error unsupported grant_type

  httprequest, laravel, oauth, oauth-2.0

Hi im gettin this error by making the http request on /oauth/authorize?$query

{"error":"unsupported_grant_type","error_description":"The authorization grant type is not supported by the authorization server.","hint":"Check that all required parameters have been provided","message":"The authorization grant type is not supported by the authorization server."}

Request:

Route::get('/login', function(Request $request) {
    $request->session()->put('state', $state = Str::random(40));

    $query = http_build_query([
        'id' => '9324f642-bd8a-4923-b2ad-a5b0d559424c',
        'redirect_uri' => 'http://localhost:8080/callback',
        'response_type' => 'code',
        'scope' => '',
        'state' => $state,
    ]);

    return redirect('http://localhost:8000/oauth/authorize?' . $query);
});

Source: Laravel

Leave a Reply