argument('code'); $clientSecret = (string) Jwt::issue($privateKey, $kid, $iss, $aud, $sub, $iat, $exp); $response = $guzzle->request('POST', 'https://appleid.apple.com/auth/token', [ 'form_params' => [ 'client_id' => $sub, 'code' => $code, 'client_secret' => $clientSecret, 'grant_type' => 'authorization_code', 'redirect_uri' => $redirectUrl, ], ]); $this->line($response->getBody()->getContents()); return 0; } }