riverside / web-auth
PHP authentication library
Fund package maintenance!
www.paypal.me/Dimitar81
dev-master
2019-06-15 05:25 UTC
Requires
- php: >=5.3
- ext-curl: *
- ext-json: *
This package is auto-updated.
Last update: 2024-10-15 18:05:01 UTC
README
PHP authentication library based on OAuth1 and OAuth2. Supported social providers includes Facebook, Google, Twitter, and LinkedIn.
Installation
$ php composer.phar install
or
"riverside/web-auth": "1.0"
Example
<?php $client = new \WebAuth\Client('Facebook'); $client ->setClientId($client_id) ->setClientSecret($client_secret) ->setRedirectUri($redirect_uri); if ($identity = $client->getIdentity()) { echo 'Hi, '. $identity->getDisplayName() .'<a href="logout">Log Out</a>'; } else { echo '<a href="'. $client->getAuthUrl() .'">Log In</a>'; }