LaravelPackages.net
Acme Inc.
Toggle sidebar
serdud/socialite-google-one-tap

Google One Tap provider for Laravel Socialite

104.000
6
v2.3.0
About serdud/socialite-google-one-tap

serdud/socialite-google-one-tap is a Laravel package for google one tap provider for laravel socialite. It currently has 6 GitHub stars and 104.000 downloads on Packagist (latest version v2.3.0). Install it with composer require serdud/socialite-google-one-tap. Discover more Laravel packages by serdud or browse all Laravel packages to compare alternatives.

Last updated

Google One Tap provider for Laravel Socialite

Latest Version on Packagist Total Downloads

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 google driver name if you're using version < 2.0.0

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.

Comments