mkarpov/slack-v2
最新稳定版本:2.0.1
Composer 安装命令:
composer require mkarpov/slack-v2
包简介
Socialite provider for slack oauth v2
关键字:
README 文档
README
Install the package
composer require mkarpov/slack-v2
Install the Service Provider
- Add
\Socialite\SlackV2\Providers\SocialiteServiceProvider::classto your providers[] array in config\app.php.
Install the config
php artisan vendor:publish --tag=slack-v2-config
Append to .env
// other values above
SLACK_KEY=yourkeyfortheservice
SLACK_SECRET=yoursecretfortheservice
SLACK_REDIRECT_URI=https://example.com/login
You do not need to add this if you add the values to the .env exactly as shown above. The values below are provided as a convenience in the case that a developer is not able to use the .env method
'slack' => [ 'client_id' => env('SLACK_KEY'), 'client_secret' => env('SLACK_SECRET'), 'redirect' => env('SLACK_REDIRECT_URI'), ],
Usage
in LoginController
redirectToProvider \Socialite::driver('slack')->redirect();
handleProviderCallback \Socialite::driver('slack')->user();
Next features...
Redirect to Slack with the scopes you want to access: ```php return \Socialite::with('slack')->scopes([ 'identity.basic', 'identity.email', 'identity.team', 'identity.avatar' ])->redirect(); ```License
MIT :)
统计信息
- 总下载量: 153
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-07-27