Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/riverside/web-auth

PHP authentication library
https://github.com/riverside/web-auth

authentication authorization facebook-login google-login linkedin-login oauth oauth1 oauth2 social-login twitter-login

Last synced: 5 days ago
JSON representation

PHP authentication library

Awesome Lists containing this project

README

        

# web-auth

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
setClientId($client_id)
->setClientSecret($client_secret)
->setRedirectUri($redirect_uri);

if ($identity = $client->getIdentity())
{
echo 'Hi, '. $identity->getDisplayName() .'Log Out';
} else {
echo 'Log In';
}
```