Skip to content

xxtime/oauth-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Oauth-client

Oauth-client is use for the third-part account login verify on the backend server.
It support Google, Facebook, Weixin, Weibo etc.

Install

composer require xxtime/oauth-client

How to use it

$id = '{Google account id}';
$token = '{Google login account token}';
$option = [
    'clientId' => '{Google app id}'
];
try {
    $oauth = new OauthAdaptor('google', $option);
    $user = $oauth->verify($id, $token);
    print_r($user);
} catch (\Exception $e) {
    echo $e->getMessage();
}

About

oauth2.0 client for mobile

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages