`"cURL error 7: (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://www.googleapis.com/oauth2/v4/token" // app/Http/Controllers/GoogleController.php:55`
AndreCol opened this issue · comments
- Socialite Version: 5.6.0
- Laravel Version: 9.48.0
- PHP Version: 8.1.8
- Database Driver & Version:
Description:
I have been struggling for the past week with this error, and I cannot find one like mine online. I am developing an application with Laravel 9 that let the user log in using the Google Account.
Furthermore, I am no expert using Laravel, so I followed this tutorial online:
I finished this tutorial and everything seems to work; however, when I log in using a Google Account and receive the callback this cURL error shows up
"cURL error 7: (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://www.googleapis.com/oauth2/v4/token" // app/Http/Controllers/GoogleController.php:55
For more info about my Code, this is the
web.php
Route::controller(GoogleController::class)->group(function(){
Route::get('auth/google', 'redirectToGoogle')->name('auth.google');
Route::get('auth/google/callback', 'handleGoogleCallback');
});
services.php
'google' => [
'client_id' => env('GOOGLE_CLIENT_ID'),
'client_secret' => env('GOOGLE_CLIENT_SECRET'),
'redirect' => 'https://mywebsite.com/auth/google/callback'
]
Steps To Reproduce:
I literally use the tutorial mentioned above in the description and it does not seem old and uses the latest packages. Everything works how it should just the callback resulted in cURL error 7 as mentioned in the description.
Hi there,
Thanks for reporting but it looks like this is a question which can be asked on a support channel. Please only use this issue tracker for reporting bugs with the library itself. If you have a question on how to use functionality provided by this repo you can try one of the following channels:
However, this issue will not be locked and everyone is still free to discuss solutions to your problem!
Thanks.
The problem may be, that multiple nginx/apache2 sites with one or multiple php-fpm pool's on the same port or without https..