ericivan/github-oauth2

1.0.0 2018-04-19 08:36 UTC

This package is not auto-updated.

Last update: 2024-04-28 03:19:55 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();