successgo / success-auth
Make oauth login easy
v1.1
2020-02-23 10:24 UTC
Requires
- php: ^7.2.5
- ext-json: *
- ext-openssl: *
- guzzlehttp/guzzle: ^6.0
This package is auto-updated.
Last update: 2024-10-27 15:50:25 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