Adding modifications from kritbit

This commit is contained in:
Nathan Adams
2016-04-14 22:01:11 -05:00
parent 5b104d624b
commit f08b2987e1
34 changed files with 3205 additions and 2404 deletions

24
system/vendor/phpoauthlib2/example.php vendored Normal file
View File

@@ -0,0 +1,24 @@
<?php
use \phpoauthlib2\providers\GoogleAuthProvider;
use \phpoauthlib2\OAuth;
require 'OAuth.php';
require 'providers/GoogleAuthProvider.php';
$authProvider = new GoogleAuthProvider($_GET, [
"client_id" => "apps.googleusercontent.com",
"client_secret" => "<KEY>",
"redirect_uri" => "http://example.com/phpoauthlib2/example.php"
]);
$oauth = new OAuth($authProvider, $_GET);
$check = $oauth->check();
if ($check === true) {
echo "Hello - " . $authProvider->getFirstName();
echo "<br>Your email is - " . $authProvider->getEmail();
} else {
header("Location: " . $check);
}