Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Oauth2 authentication takes about 15 seconds

I am using google-php-api for authentication.

this takes most of the time just under 6 seconds, $client->authenticate($code);

this takes most of the time about 3 seconds, $token = $client->getAccessToken();

this takes most of the time just under 6 seconds too. $client->$data = $client->verifyIdToken($tokens->id_token)

Any idea why, or is it normal?

like image 602
kak3n Avatar asked Sep 18 '25 06:09

kak3n


1 Answers

Forceing ipv4 hepled

curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
like image 162
kak3n Avatar answered Sep 19 '25 21:09

kak3n