The Easy Way
How to run a basic Webauthn server?
The easiest way to create a Webauthn Server is to use the class Webauthn\Server.
1
<?php
2
3
use Webauthn\Server;
4
use Webauthn\PublicKeyCredentialRpEntity;
5
6
$rpEntity = new PublicKeyCredentialRpEntity(
7
'Webauthn Server',
8
'my.domain.com'
9
);
10
$publicKeyCredentialSourceRepository =; //Your repository here. Must implement Webauthn\PublicKeyCredentialSourceRepository
11
12
$server = new Server(
13
$rpEntity
14
$publicKeyCredentialSourceRepository
15
);
Copied!
That’s it!
Last modified 1d ago
Export as PDF
Copy link