owenvoke/socialite-unstoppable-domains
Composer 安装命令:
composer require owenvoke/socialite-unstoppable-domains
包简介
An Unstoppable Domains provider for Laravel Socialite
README 文档
README
An Unstoppable Domains provider for Laravel Socialite
Install
Via Composer
composer require owenvoke/socialite-unstoppable-domains
Please see the Base Installation Guide, then follow the provider specific instructions below.
Add configuration to config/services.php
'unstoppable_domains' => [ 'client_id' => env('UNSTOPPABLE_DOMAINS_CLIENT_ID'), 'client_secret' => env('UNSTOPPABLE_DOMAINS_CLIENT_SECRET'), 'redirect' => env('UNSTOPPABLE_DOMAINS_REDIRECT_URI') ],
Add provider event listener
Configure the package's listener to listen for SocialiteWasCalled events.
Add the event to your listen[] array in app/Providers/EventServiceProvider. See the Base Installation Guide for detailed instructions.
protected $listen = [ \SocialiteProviders\Manager\SocialiteWasCalled::class => [ // ... other providers \OwenVoke\UnstoppableDomainsSocialite\UnstoppableDomainsExtendSocialite::class, ], ];
Usage
You should now be able to use the provider like you would regularly use Socialite (assuming you have the facade installed):
return Socialite::driver('unstoppable_domains')->with(['login_hint' => $domain])->redirect();
Note, you are required to pass in the
login_hintwhich is the domain that the user provided.
By default the email:optional scope is provided, if you want to require an email address to be returned, use the following:
return Socialite::driver('unstoppable_domains') ->scopes(['email']) // This will override the `email:optional` scope ->with(['login_hint' => $domain]) ->redirect();
Returned User fields
id: The id (domain) of the authenticated usertoken: The token of the authenticated useremail: The email address of the user (optional by default)wallet_address: The wallet address of the userusersub: The domain of the authenticated userwallet_address: The wallet address of the userwallet_type_hint: The method of wallet authentication the user usedemail: The email address of the user (optional by default)email_verified: A boolean stating whether the user's email has been verified (optional by default)
Change log
Please see CHANGELOG for more information on what has changed recently.
Testing
composer test
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email security@voke.dev instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.
Treeware
You're free to use this package, but if it makes it to your production environment you are required to buy the world a tree.
It’s now common knowledge that one of the best tools to tackle the climate crisis and keep our temperatures from rising above 1.5C is to plant trees. If you support this package and contribute to the Treeware forest you’ll be creating employment for local families and restoring wildlife habitats.
You can buy trees here.
Read more about Treeware at treeware.earth.
owenvoke/socialite-unstoppable-domains 适用场景与选型建议
owenvoke/socialite-unstoppable-domains 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 14 次下载、GitHub Stars 达 3, 最近一次更新时间为 2021 年 12 月 21 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 owenvoke/socialite-unstoppable-domains 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 owenvoke/socialite-unstoppable-domains 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 14
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-12-21