mirror of
https://bitbucket.org/jsuto/piler.git
synced 2025-06-13 16:47:01 +02:00
added google xoauth2 support + fixed a journaling issue
This commit is contained in:
@ -51,6 +51,25 @@ class ControllerLoginLogin extends Controller {
|
||||
}
|
||||
|
||||
|
||||
if(ENABLE_GOOGLE_LOGIN == 1) {
|
||||
$client = new apiClient();
|
||||
$client->setApplicationName(GOOGLE_APPLICATION_NAME);
|
||||
|
||||
$client->setScopes(array(
|
||||
'https://www.googleapis.com/auth/userinfo.email',
|
||||
'https://www.googleapis.com/auth/userinfo.profile',
|
||||
'https://mail.google.com/',
|
||||
));
|
||||
|
||||
$client->setClientId(GOOGLE_CLIENT_ID);
|
||||
$client->setClientSecret(GOOGLE_CLIENT_SECRET);
|
||||
$client->setRedirectUri(GOOGLE_REDIRECT_URL);
|
||||
$client->setDeveloperKey(GOOGLE_DEVELOPER_KEY);
|
||||
|
||||
$this->data['auth_url'] = $client->createAuthUrl();
|
||||
}
|
||||
|
||||
|
||||
$this->render();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user