Files
globelus.pl/libraries/gpConfig.php
2024-11-11 15:28:20 +01:00

21 lines
825 B
PHP

<?php
global $settings;
$settings['ssl'] ? $base = 'https' : $base = 'http';
require_once 'libraries/google-api-php-client/Google_Client.php';
require_once 'libraries/google-api-php-client/contrib/Google_Oauth2Service.php';
$clientId = '453060459223-r19h4h74pjo8smsbmapbqgljs0sg5get.apps.googleusercontent.com';
$clientSecret = '1cIGIlaVvPHIkNRfDJlVObr-';
$settings['ssl'] ? $base = 'https' : $base = 'http';
$redirectURL = $base . "://" . $_SERVER['SERVER_NAME'] . '/globelus-login.php';
$gClient = new Google_Client();
$gClient -> setApplicationName( 'Logowanie na globelus.pl' );
$gClient -> setClientId( $clientId );
$gClient -> setClientSecret( $clientSecret );
$gClient -> setRedirectUri( $redirectURL );
$gClient -> setState( 'g_type=0&g_register=0' );
$google_oauthV2 = new Google_Oauth2Service( $gClient );