Login with google one tap/google popup login for Laravel
✨ Now supports Laravel 12!
requires
- php: >=8.2
- laravel/framework: ^9.0|^10.0|^11.0|^12.0
composer require phhung1901/google_one_tap'google' => [
'client_id' => env('GOOGLE_CLIENT_ID'),
'client_secret' => env('GOOGLE_CLIENT_SECRET'),
'redirect' => env('GOOGLE_URL')
],<script src="https://accounts.google.com/gsi/client" async="" defer=""></script>Add to providers config/app.php
\GoogleOneTap\Services\GoogleOneTapServiceProvider::class,php artisan vendor:publish --tag=google_one_tapNow, add the component wherever you want google_one_tap to be used.
<x-google_one_tap.onload/>Config googe-one-tap.php you can add customizations
$token = GoogleOneTapService::getToken($request);
return Socialite::driver('google-one-tap')->stateless()->userFromToken($token)The MIT License (MIT). Please see License File for more information.
