1. Go to this page and download the library: Download ronu/laravel-federated-auth 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/ */
// routes/admin.php — the default cannot be overridden by a request field.
Route::get('/auth/google/login', [SignInController::class, 'redirect'])
->defaults('trusted_channel', 'admin');
$context = AuthContext::fromTrustedRoute('google', $request, [
// Values your application derives server-side. NOT a way to pass request
// input back in.
'redirect_uri' => $this->policy->callbackUri($channel),
'metadata' => ['federated_login_only' => true],
]);