1. Go to this page and download the library: Download qiick/laravel-oidc 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/ */
$identity = app(AuthorizationCodeFlowService::class)->handleCallback($request); // throws an OidcException subclass
$challenge = app(OidcLoginService::class)->login($request, $identity); // null when signed in, else the 2FA challenge; throws LoginRefusedException
$endSessionUrl = app(RpInitiatedLogoutService::class)->endSessionUrl($request->session()); // null for a local login
Auth::logout();
$request->session()->invalidate();
$request->session()->regenerateToken();
return $endSessionUrl !== null ? redirect()->away($endSessionUrl) : redirect('/');