Download the PHP package cresjie/social-login without Composer
On this page you can find all versions of the php package cresjie/social-login. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package social-login
Social Login
Laravel 4 Authentication with Social Services API (OAuth2) like Google, Facebook, Yahoo, Github
Installation via Composer
Add this to your composer.json file, in the require object:
After that, run composer install to install the package.
Add the service provider to app/config/app.php, within the providers array.
Configuration
Publish the default config file to your application so you can make modifications.
Add your service provider credentials to the published config file:
for formality set your redirect callback credential to something like: www.mysite.com/login/google/callback see Basic usage -> Authentication
BASIC USAGE
Login Page
where provider is a social service like google, facebook, etc.. this would redirect the user to the login page for the that social service.
Authentication
after the user logs in to his social service. He/she will be redirected to the url specified in your config file redirect, and just call the SocialLogin::authenticate($provider) to retrieve information
Other Usage
you can also filter results in the config file to have uniform calls. For example retrieving profile picture in google has an array key of picture while in github has an array key of avatar_url
how about a uniform call.
how? just set filter_result in the config file with something like:
we've just add another key to the result value to have a uniform call.. cool!
Access Token
After the user successfully authenticate the login. You can get the access token by calling the method: SocialLogin::getAccessToken()