I am using Laravel Passport to request a token using authorization code.
$body = [ "grant_type" => "authorization_code", "client_id" => env('CLIENT_ID_AUTH'), "client_secret" => env('CLIENT_SECRET_AUTH'), 'redirect_uri' => env('GOOGLE_REDIRECT'), 'code' => $request->input('idToken'), 'scope' => '*' ];
$response = Http::asForm()->post( env('APP_URL'). self::OAUTH_TOKEN, $body);
The response returns { "error": "invalid_request", "error_description": "The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed.", "hint": "Cannot decrypt the authorization code", "message": "The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed." }
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community