Webauthn Framework
v4.0
v4.0
  • The project
    • Introduction
    • Web Browser Support
    • Installation
    • Contributing
  • Webauthn In A Nutshell
    • Authenticators
    • Ceremonies
    • Metadata Statement
    • User Verification
    • Extensions
    • Token Binding
  • Prerequisites
    • The Relying Party
    • Credential Source Repository
    • User Entity
    • Javascript
  • Pure PHP
    • Webauthn Server
    • Register Authenticators
    • Authenticate Your Users
    • Advanced Behaviours
      • Debugging
      • User Verification
      • Authenticator Selection Criteria
      • Attestation and Metadata Statement
      • Authentication without username
      • Extensions
      • Authenticator Counter
      • Dealing with “localhost”
  • Symfony Bundle
    • Bundle Installation
    • Credential Source Repository
    • User Entity Repository
    • Firewall
    • Configuration References
    • Advanced Behaviors
      • Register Additional Authenticators
      • Debugging
      • User Verification
      • Attestation and Metadata Statement
      • Authenticator Selection Criteria
      • Authentication without username
      • Extensions
      • Token Binding
      • Authenticator Counter
      • Dealing with “localhost”
  • Migration
    • From v3.x to v4.0
Powered by GitBook
On this page
  • Installation
  • With Symfony Flex
  • Without Symfony Flex
  • Repositories
  • Firewall

Was this helpful?

Edit on GitHub
Export as PDF
  1. Symfony Bundle

Bundle Installation

PreviousDealing with “localhost”NextCredential Source Repository

Last updated 3 years ago

Was this helpful?

This framework provides a Symfony bundle that will help you to use the components within your Symfony application.

If you use Laravel, you may be interested in

Installation

With Symfony Flex

Symfony Flex recipes are provided through a dedicated repository. It is highly recommended to add this repository before installing the bundle.

composer config --json extra.symfony.endpoint '["https://api.github.com/repos/Spomky-Labs/recipes/contents/index.json?ref=main", "flex://defaults"]'
composer.json
{
    ...
    "extra": {
        "symfony": {
            "endpoint": [
                "https://api.github.com/repos/Spomky-Labs/recipes/contents/index.json?ref=main",
                "flex://defaults"
            ]
        }
    }
}

Then, you can install the bundle or the complete framework:

composer require web-auth/webauthn-symfony-bundle #Will only install the bundle

#or
composer require web-auth/webauthn-framework# Will install the whole framework (not recommended)

As the recipes are third party ones not officially supported by Symfony, you will be asked to execute the recipe or not. When applied, the recipes will prompt a message such as WebAuthn Framework is ready.

Without Symfony Flex

If you don't use Symfony Flex, you must register the bundle manually.

config/bundles.php
<?php

return [
    //...
    Webauthn\Bundle\WebauthnBundle::class => ['all' => true],
];
config/routes/webauthn.php
<?php

declare(strict_types=1);

use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator;

return function (RoutingConfigurator $routes) {
    $routes->import('.', 'webauthn');
};

Repositories

The first steps are:

Firewall

The creation of your

The creation of your .

You may also want to configure the other options offered by the bundle. Please refer to the .

Now you have a fully configured bundle, you can protect your routes and manage the user registration and authenticatin through the .

this project: https://github.com/asbiin/laravel-webauthn
Credential Source repository
User Entity repositories
configuration references
Symfony Firewall