Download the PHP package edisonthk/google-oauth-laravel4 without Composer
On this page you can find all versions of the php package edisonthk/google-oauth-laravel4. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download edisonthk/google-oauth-laravel4
More information about edisonthk/google-oauth-laravel4
Files in edisonthk/google-oauth-laravel4
Package google-oauth-laravel4
Short Description Optimize artdarek/oauth-4-laravel with Google OAuth 2.0 for laravel 4
License MIT
Homepage https://github.com/edisonthk/google-oauth-laravel4
Informations about the package google-oauth-laravel4
Google OAuth for Laravel 4
oauth-4-laravel is a simple laravel 4 Google OAuth 2.0 . It is integrated with Lusitanian/PHPoAuthLib and artdarek/oauth-4-laravel which provides oAuth 2.0 support in PHP 5.3+ for laravel 4.
Installation
This package is available in packagist.org. You can install it by adding following in composer.json
then, install it by
After finish installed, import service provider and alias in app/config/app.php
Configuration & Credentials
Get your client_secret and client_id from Google Developers Console. Then, configure it with laravel. There are 2 options you can configure with it.
Option 1:
Create config file by artisan command.
Then, config file will be generated at app/config/packages/edisonthk/google-oauth-laravel4/config.php. Fill it in with your client_secret, cliend_id, redirect_url and scope.
Option 2:
Create a config file called google-oauth-laravel4.php in app/config directory. Then add following code and fill in your client_secret, cliend_id and redirect_url.
Sample code
On configuration
On app/routes.php
On app/controllers/HomeController.php