<?php

	if(session_status() == PHP_SESSION_NONE) session_start();
	require_once 'google-api-php-client-2.2.2/vendor/autoload.php';
	
	$CLIENT_ID = '76698467712-44aghb60h3ou9d3t3qcbkdokubseaiaa.apps.googleusercontent.com';
	$CLIENT_SECRET = '9j17D7aVD1FnPxUmcAmQKnNy';
	$APP_NAME = 'TANIA Administrative Page';
	$REDIRECT_URI = 'https://tania.uprrp.edu/admin_nuevo/processes/callback.php'; // CHANGE IF SERVER CHANGES
	
	$client = new Google_Client();
	$client->setClientId($CLIENT_ID);
	$client->setClientSecret($CLIENT_SECRET);
	$client->setApplicationName($APP_NAME);
	$client->setRedirectUri($REDIRECT_URI);
	$client->setPrompt('consent'); // FORCE USER TO CHOOSE GOOGLE ACCOUNT (INSTEAD OF ASUMING AUTOMATICALLY)
	$client->addScope('profile');
	$client->addScope('email');
	
	$loginURL = $client->createAuthUrl();
