1. Go to this page and download the library: Download gecka/socialite-ncconnect 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/ */
use Illuminate\Support\Facades\Event;
use SocialiteProviders\Manager\SocialiteWasCalled;
use SocialiteProviders\NcConnect\NcConnectExtendSocialite;
public function boot(): void
{
Event::listen(SocialiteWasCalled::class, NcConnectExtendSocialite::class.'@handle');
}
$token = Socialite::driver('ncconnect')->refreshToken($refreshToken);
$token->token; // new access token
$token->refreshToken; // new refresh token
$token->expiresIn; // expiry in seconds
// Basic logout (uses logout_redirect from config)
$logoutUrl = Socialite::driver('ncconnect')->generateLogoutURL();
// With id_token_hint (recommended — enables seamless logout)
$logoutUrl = Socialite::driver('ncconnect')->generateLogoutURL($idTokenHint);
// With a custom post-logout redirect URI
$logoutUrl = Socialite::driver('ncconnect')->generateLogoutURL($idTokenHint, 'https://example.com/logged-out');
// Without arguments and no logout_redirect config: returns the bare logout endpoint
$user = Socialite::driver('ncconnect')->user();
$user->tokenId; // store this for logout
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.