xxtime / oauth-client
oauth2.0 client
Installs: 28
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 0
Open Issues: 0
pkg:composer/xxtime/oauth-client
Requires
- php: >=5.5
- xxtime/curl-utils: ~0.1.1
This package is auto-updated.
Last update: 2025-10-15 18:49:05 UTC
README
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(); }