Integrations
Accept MitID, Swedish BankID, Norwegian BankID and other eID logins with PHP and Criipto Verify
composer require jumbojett/openid-connect-php
require __DIR__ . '/vendor/autoload.php';
require __DIR__ . '/vendor/autoload.php';
use Jumbojett\OpenIDConnectClient;
$oidc = new OpenIDConnectClient('https://{{YOUR_CRIIPTO_DOMAIN}}',
'{{YOUR_CLIENT_ID}}',
'{{YOUR_CLIENT_SECRET}}');
$oidc->authenticate();
// Or any other available claim based on your used authentication method: https://docs.criipto.com/verify/e-ids/
$name = $oidc->getVerifiedClaims('name');
You will need to register whichever URL you are calling $oidc->authenticate()
on as a Callback URL on your Criipto Application.
If you're testing locally using php -S localhost:8000
and a file called auth.php
the callback url, as an example, would be https://localhost:8000/auth.php