# The Symfony Way

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

{% hint style="info" %}
If you use Laravel, you may be intersted in [this project: https://github.com/asbiin/laravel-webauthn](https://github.com/asbiin/laravel-webauthn)
{% endhint %}

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

{% code title="src/AppKernel.php" %}

```php
<?php

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

{% endcode %}

### Entities

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

* [With Doctrine](/v2.x-1/the-webauthn-server/the-symfony-way/entities-with-doctrine.md)

### Configuration

The minimal configuration requires the[ user repository](/v2.x-1/pre-requisites/user-entity-repository.md) and the [pk credential source repository](/v2.x-1/pre-requisites/credential-souce-repository.md).

{% code title="app/config/webauthn.yaml" %}

```yaml
webauthn:
    credential_repository: 'App\Repository\PublicKeyCredentialSourceRepository'
    user_repository: 'App\Repository\PublicKeyCredentialUserEntityRepository'
```

{% endcode %}

Now you may want to:

* [Register your first authenticators](/v2.x-1/the-webauthn-server/the-symfony-way/register-authenticators.md),
* [Authenticate your users](/v2.x-1/the-webauthn-server/the-symfony-way/firewall.md).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://webauthn-doc.spomky-labs.com/v2.x-1/the-webauthn-server/the-symfony-way.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
