ander0542 / sander-auth-socialite
此软件包最新版本(1.0.1)没有可用的许可证信息。
Sander Auth OAuth2 Provider for Laravel Socialite
1.0.1
2020-02-09 13:46 UTC
Requires
- php: ^7.2
- socialiteproviders/manager: ^3.0
This package is auto-updated.
Last update: 2024-09-10 02:48:38 UTC
README
Sander Auth provider for Laravel Socialite
使用方法
Socialite::with('sander-auth')->redirect();
开发
要求
- PHP 7.2 或更高版本
- Laravel 6.0 或更高版本
安装
- 将此存储库添加到 composer.json
"repositories": [ { "type": "vcs", "url": "git@github.com:sander0542/sander-auth-socialite.git" } ]
- 将存储库添加到 composer:
composer require sander0542/sander-auth-socialite
- 将
SocialiteWasCalled
添加到app/Providers/EventServiceProvider.php
protected $listen = [ // a whole bunch of listeners \SocialiteProviders\Manager\SocialiteWasCalled::class => [ // add your listeners (aka providers) here 'SocialiteProviders\\SanderAuth\\SanderAuthExtendSocialite@handle', ], ];
- 将 Sander Auth 设置添加到
config/services.php
'sander-auth' => [ 'client_id' => env('SANDER_AUTH_CLIENT_ID'), 'client_secret' => env('SANDER_AUTH_CLIENT_SECRET'), 'redirect' => env('SANDER_AUTH_REDIRECT_URI'), ],