PHP code example of noriel0010 / third-party-sso
1. Go to this page and download the library: Download noriel0010/third-party-sso 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/ */
noriel0010 / third-party-sso example snippets
use Noriel\SSO\Auth\Service\ThirdPartyService;
$service = new ThirdPartyService();
try {
$apple = $service->apple('apple.identity.token', 'your.app.as.audience')->authenticate();
$facebook = $service->facebook('facebook.access.token')->authenticate();
$google = $service->google('google.access.token', 'google_key')->authenticate();
$linkedin = $service->linkedin('linkedin.access.token')->authenticate();
$microsoft = $service->microsoft('microsoft.access.token')->authenticate();
} catch (\Throwable $th) {
echo $th->getMessage();
}