Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/successgo/success-auth
Make OAuth login easy
https://github.com/successgo/success-auth
oauth
Last synced: 10 days ago
JSON representation
Make OAuth login easy
- Host: GitHub
- URL: https://github.com/successgo/success-auth
- Owner: successgo
- License: other
- Created: 2020-02-16T06:35:42.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-03-27T05:21:19.000Z (over 4 years ago)
- Last Synced: 2024-04-22T00:52:35.207Z (7 months ago)
- Topics: oauth
- Language: PHP
- Homepage:
- Size: 18.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SuccessAuth
Make auth login easy
## Install
```shell script
composer require "successgo/success-auth:^1.0" -vvv
```## Use
```php
// 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## LICENSE
See https://successgo.mit-license.org