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.


use Webauthn\Server;
use Webauthn\PublicKeyCredentialRpEntity;

$rpEntity = new PublicKeyCredentialRpEntity(
    'Webauthn Server',
$publicKeyCredentialSourceRepository = …; //Your repository here. Must implement Webauthn\PublicKeyCredentialSourceRepository

$server = new Server(

That’s it!

You can now register a new authenticator or authenticate your users.

Last updated