An Unstoppable Domains provider for Laravel Socialite
Via Composer
composer require owenvoke/socialite-unstoppable-domains
Please see the Base Installation Guide, then follow the provider specific instructions below.
'unstoppable_domains' => [
'client_id' => env('UNSTOPPABLE_DOMAINS_CLIENT_ID'),
'client_secret' => env('UNSTOPPABLE_DOMAINS_CLIENT_SECRET'),
'redirect' => env('UNSTOPPABLE_DOMAINS_REDIRECT_URI')
],
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,
],
];
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_hint
which 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();
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 useruser
sub
: 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)
Please see CHANGELOG for more information on what has changed recently.
composer test
Please see CONTRIBUTING for details.
If you discover any security related issues, please email security@voke.dev instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.
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.