The Symfony Way

Symfony is a very popular framework and an official bundle is provided in the package web-auth/webauthn-symfony-bundle.

If you use Laravel, you may be intersted in this project: https://github.com/asbiin/laravel-webauthn

If you are using Symfony Flex then the bundle will automatically be installed. Otherwise you need to add it in your AppKernel.php file:

src/AppKernel.php
<?php

public function registerBundles()
{
    $bundles = [
        // ...
        new Webauthn\Bundle\WebauthnBundle(),
    ];
}

Entities

At the moment, only Doctrine is supported, however there is no technical constraint to allow other data storage systems.

Configuration

The minimal configuration requires the user repository and the pk credential source repository.

app/config/webauthn.yaml
webauthn:
    credential_repository: 'App\Repository\PublicKeyCredentialSourceRepository'
    user_repository: 'App\Repository\PublicKeyCredentialUserEntityRepository'

Now you may want to:

Last updated