Integrating Google Login with CodeIgniter by Ngekoding.
- Make sure composer was installed
- Make sure you have Google client id and client secret (also setting for callback url, etc.)
- For local use
- Setting in OAuth consent screen --> Authorized domains: use virtualhost (e.g. ngekoding.me)
- Setting in Credentials --> Authorized redirect URIs: http://ngekoding.me/index.php/auth/google_callback
- For local use
- Clone/download this repo and place to your local server
- XAMPP: path/to/xampp/htdocs
- Open
application/config/config.php
and changebase_url
to your own setting (Note: for local use, please use a virtualhost) - Rename
google.example.php
togoogle.php
inapplication/config
and change the value (g_client_id, etc.) - Installing google client library
- Open CMD/Terminal
- Go to project directory
google-login/application
- Run
composer install
- Finish
- Open browser and type the address (e.g http://ngekoding.me)