serdud / socialite-google-one-tap
Google One Tap provider for Laravel Socialite
Installs: 8 180
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 2
Forks: 1
Open Issues: 0
Requires
- php: ^7.4 || ^8.0
- google/apiclient: ^2.0
- illuminate/support: ^6.0 || ^7.0 || ^8.0 || ^9.0 || ^10.0 || ^11.0
- laravel/socialite: ~5.0
README
Installation & Basic Usage
composer require serdud/socialite-google-one-tap
Add configuration to config/services.php
'google' => [ 'client_id' => env('GOOGLE_CLIENT_ID'), 'client_secret' => env('GOOGLE_CLIENT_SECRET'), 'redirect' => env('GOOGLE_REDIRECT_URI') ],
Usage
You should now be able to use the provider like you would regularly use Socialite:
return Socialite::driver('google-one-tap')->stateless()->userFromToken($token);
Note Use
Note The token is returned in the
credential
field
Returned User fields
id
nickname
name
email
avatar
given_name
family_name
Credits
License
The MIT License (MIT). Please see License File for more information.