config.php page code for google oAuth Login in PHP
<?php
//start session on web page
session_start();
//config.php
//Include Google Client Library for PHP autoload file
require_once 'vendor/autoload.php';
//Make object of Google API Client for call Google API
$google_client = new Google_Client();
//Set the OAuth 2.0 Client ID
$google_client->setClientId('Your Clint ID.apps.googleusercontent.com');
//Set the OAuth 2.0 Client Secret key
$google_client->setClientSecret('Your Client Secret Key');
//Set the OAuth 2.0 Redirect URI
$google_client->setRedirectUri('Your exact location where you want the code to be run');
// to get the email and profile
$google_client->addScope('email');
$google_client->addScope('profile');
?> Close your php here
Excellent post, thanks for this. I gathered lots of information from this and I am happy about it. Do share more updates.
ReplyDeletePHP Training in Chennai
Best PHP Training Institute in Chennai
PHP Institute in Chennai
Angular Training in Chennai
Web Designing Training in Chennai
Salesforce Training in Chennai
Tally course in Chennai
Machine Learning course in Chennai
Salesforce course in Chennai
PHP and MYSQL Interview Questions
nice
ReplyDeletennn
ReplyDeleteTyuu
ReplyDeleteNice
ReplyDeletemuzhe isme gender bhi show karna hai maine ye line index.php mai niche add ki echo gender : '.$_SESSION['user_gender'].; lekin muzhe undefined index ka error aara hai. please help.
ReplyDeletewhere is the index.html file?
ReplyDelete