1. Go to this page and download the library: Download jasny/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/ */
jasny / sso example snippets
use Jasny\SSO\Server\Server;
$brokers = [
'foo' => ['secret' => '8OyRi6Ix1x', 'domains' => ['example.com']],
// ...
];
$server = new Server(
fn($id) => $brokers[$id] ?? null, // Unique secret and allowed domains for each broker.
new Cache() // Any PSR-16 compatible cache
);