Revert OAuth2.0
This commit is contained in:
@@ -4,9 +4,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace App\Services;
|
||||
|
||||
use App\Enums\GoogleService;
|
||||
use App\Models\CalendarioConnessione;
|
||||
use App\Services\GoogleOAuthService;
|
||||
use App\Models\Evento;
|
||||
use Carbon\Carbon;
|
||||
use Google\Client as GoogleClient;
|
||||
@@ -329,16 +327,6 @@ class GoogleCalendarSyncService
|
||||
|
||||
private function buildClient(CalendarioConnessione $connessione): GoogleClient
|
||||
{
|
||||
try {
|
||||
$oauth = app(GoogleOAuthService::class);
|
||||
$connection = $oauth->getConnection(GoogleService::Calendar);
|
||||
if ($connection) {
|
||||
return $oauth->buildClient(GoogleService::Calendar);
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
\Illuminate\Support\Facades\Log::warning('Central Calendar OAuth failed, falling back: ' . $e->getMessage());
|
||||
}
|
||||
|
||||
$config = $connessione->getDecryptedConfig();
|
||||
|
||||
$client = new GoogleClient();
|
||||
|
||||
Reference in New Issue
Block a user