ericivan / github-oauth2
Installs: 14
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/ericivan/github-oauth2
Requires
- php: >=5.5
- guzzlehttp/guzzle: ~6.0
Requires (Dev)
- phpunit/phpunit: ~4.0|~5.0
This package is not auto-updated.
Last update: 2025-10-26 11:18:28 UTC
README
app.php 加入 \Github\GithubServiceProvider::class,
aliases 加入 Facade 'Github' => \Github\Facades\Github::class,
serives.php 中加入配置项
'github'=>[ 'client_id' => 'client_id', 'client_secret' => 'client_secret', 'redirect_url' => 'redirect_url', ]
基本使用
获取登录跳转地址
Github::with('github')->redirect();
回调地址获取登录用户
$user=Github::with('github')->user();