sramitroy / social
implementation of social authentication's specification for php
Installs: 11
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/sramitroy/social
Requires
- php: >=5.3.2
Requires (Dev)
- phpunit/phpunit: ~7.0|~6.0|~5.0|~4.8.35
This package is auto-updated.
Last update: 2025-11-29 02:58:16 UTC
README
Implementation of Social Authentication for php
Install
Via Composer
$ composer require sramitroy/social
Usage
// FIRST STEP use Soft\Google; $gObject = new Google([ 'client_id'=>'YOUR_CLIENT_ID', 'redirect_uri'=>'YOUR_REDIRECT_URL', 'client_secret'=>'YOUR_CLIENT_SECREAT', ]); $url= $gObject->LogInUrl(); //return Google Login URL
// SECOND STEP // DEFINE THESE SCRIPTS ONTO CALL BACK FILE use Soft\Google; $gObject = new Google([ 'client_id'=>'YOUR_CLIENT_ID', 'redirect_uri'=>'YOUR_REDIRECT_URL', 'client_secret'=>'YOUR_CLIENT_SECREAT', ]); $AccessToken = $gObject->AccessToken($_GET['code']); $profile = $gObject->UserProfile( $AccessToken['access_token'], ['name','email','gender,id','picture','verified_email'] ); // return google profile information
Testing
$ phpunit
License
The MIT License (MIT). Please see License File for more information.