Google Login Integration in Codeigniter Paste in Controller $uuser_id = ''; include_once(FCPATH.'googlelogin-library/vendor/autoload.php'); $google_client = new Google_Client(); $google_client->setClientId('975330128814-il47gqr1l99uleblged7altinhpm99g3.apps.googleusercontent.com'); //Define your ClientID $google_client->setClientSecret('c-6xwtqoC4DRXV_blQ9QB6Lu'); //Define your Client Secret Key $google_client->setRedirectUri(base_url().'login'); //Define your Redirect Uri $google_client->addScope('email'); $google_client->addScope('profile'); //echo '<pre>'; // print_r($google_client); //echo $_GET["code"]; if(isset($_GET["code"])) { $token = $google_client->fetchAccessTokenWithAuthCode($_GET["code"]); if(!isset($token["error"])) { $google_client->setAccessToken($t...
We provide knowledgeable blogs related to php, jQuery, html, css, wordpress, woocommerce, cordova app with examples in 2021.