successgo / success-auth
Make oauth login easy
Installs: 2 098
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 1
Requires
- php: ^7.2.5
- ext-json: *
- ext-openssl: *
- guzzlehttp/guzzle: ^6.0
This package is auto-updated.
Last update: 2024-11-27 16:03:20 UTC
README
Make auth login easy
Install
composer require "successgo/success-auth:^1.0" -vvv
Use
// build config $config = \SuccessGo\SuccessAuth\Config\AuthConfigBuilder::builder() ->clientId('Client Id') ->clientSecret('Client Secret') ->redirectUri('Redirect Uri') ->build(); // build the auth request $authRequest = new \SuccessGo\SuccessAuth\Request\AuthRequest\WechatOpenAuthRequest($config, new \SuccessGo\SuccessAuth\Config\AuthSource\WechatOpenAuthSource()); // build auth callback $authCallback = \SuccessGo\SuccessAuth\Model\AuthCallbackBuilder::builder()->code('Code')->build(); // get the auth response $authResponse = $authRequest->login($authCallback); if ($authResponse->isOk()) { // Do your business here }
Acknowledgement
- JustAuth https://github.com/justauth/JustAuth
- YunrunOAuthLogin https://github.com/Yurunsoft/YurunOAuthLogin