PHP code example of phhung1901 / google_one_tap

1. Go to this page and download the library: Download phhung1901/google_one_tap library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

phhung1901 / google_one_tap example snippets


'google' => [
  'client_id' => env('GOOGLE_CLIENT_ID'),
  'client_secret' => env('GOOGLE_CLIENT_SECRET'),
  'redirect' => env('GOOGLE_URL')
],

\GoogleOneTap\Services\GoogleOneTapServiceProvider::class,

$token = GoogleOneTapService::getToken($request);
return Socialite::driver('google-one-tap')->stateless()->userFromToken($token)
bash
php artisan vendor:publish --tag=google_one_tap