<?php
session_start();
include_once '../library/sw-config.php';
// Include Librari Google Client (API)
include_once '../library/google-client/Google_Client.php';
include_once '../library/google-client/contrib/Google_Oauth2Service.php';

$client_id = '9446316250-16oisml3q5j5bi1bl9rittostghlsetd.apps.googleusercontent.com'; // Google client ID
$client_secret = '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'; // Google Client Secret
$redirect_url = ''.$site_url.'oauth/google'; // Callback URL

// Call Google API
$gclient = new Google_Client();
$gclient->setClientId($client_id); // Set dengan Client ID
$gclient->setClientSecret($client_secret); // Set dengan Client Secret
$gclient->setRedirectUri($redirect_url); // Set URL untuk Redirect setelah berhasil login

$google_oauthv2 = new Google_Oauth2Service($gclient);
?>
