Laravel 5 Socialite - cURL error 77: error setting certificate verify locations

后端 未结 21 1918
暖寄归人
暖寄归人 2020-12-02 18:36

I am using socialite in Laravel 5 to setup facebook login. I followed the instructions carefully until I got stuck with the following error

cURL error 60: SS         


        
21条回答
  •  [愿得一人]
    2020-12-02 19:07

    For solve this error use this code :

     $client = new Client(['verify' => false ]);
    

    And use this $client like this in your code:

       $headers = [
                'Authorization' => 'Bearer ' . $token,
                'Accept' => 'application/json',
                RequestOptions::BODY => ' any code for your body ',
            ];
    
            $response = $client->request('POST', 'bar', [
                'headers' => $headers
            ]);
    
            $response = $response->getBody()->getContents();
    
            return $response;
    

提交回复
热议问题