CodeIgniter Forums
login with gmail - Printable Version

+- CodeIgniter Forums (
+-- Forum: Development (
+--- Forum: CodeIgniter 3.x (
+--- Thread: login with gmail (/thread-68473.html)

login with gmail - jackey - 07-16-2017

i want my system to login with gmail using google API client library. based on their right given by me, i need to redirect them into the appropriate page.
i tried to add composer into my CodeIgniter project to install google API client library. its not working. it says"Installation failed, reverting ./composer.json to its original content."

then i copy and paste a download google API client library under the application->libraries. it is also not working.
i also followed the steps in google site. something has went wrong with me. Sad

if anyone have clear and simple code which is recently used , pls share with me.

first i want to test it with my localhost. after that i want to use it live server.

i also uncomment the line extension=php_openssl.dll in two php.ini files in PRODUCTION and DEVELOPMENT file in my local machine.

$client_id and $client_secret i entered correctly which is taken from
$redirect_uri = base_url('Login/gcallback');

$client->setApplicationName("???"); here i have to put the name for OAuth 2.0 client IDs OR the project name i gave under Credentials?

Message: Class 'Google_Client' not found
Filename: controllers/Login.php

is there any wrong with $client = new Google_Client();