Açıklama Yok

config.php 818B

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