I use MAMP as local development environment. I want to implement a Google Auth - but keep getting this SSL Error.
curl.cainfo ="C:/MAMP/bin/php/php7.4.1/extras/ssl/cacert.pem"
Any ideea how to pass this SSL error on my local enviroment?
This is the code:
$google_client = new \Google_Client();
$google_client->setClientId($clientID);
$google_client->setClientSecret($clientSecret);
$google_client->setRedirectUri($redirectUri);
$google_client->addScope("email");
$google_client->addScope("profile");
if($this->request->getVar('code')){
$token = $google_client->fetchAccessTokenWithAuthCode($this->request->getVar('code'));
if(!isset($token['error'])){
$google_client->setAccessToken($token['access_token']);
$this->session->set('access_token', $token['access_token']);
//get Google profile data
$google_service = new \Google_Service_Oatuth2($google_client);
$data = $google_service->userinfo->get();
print_r($data);
Update the location of the cacert.pem in your openssl.cnf file to point to the latest version you got from curl.se and you should be right.