> For the complete documentation index, see [llms.txt](https://docs.fortifiedid.se/access/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fortifiedid.se/access/key-components/authenticators/credential-validators/passkey-validator.md).

# Passkey validator

Configuration and usage guidance for Passkey validator in Fortified ID Access.

**Other components that this module uses or need:**

* Web -> **WebAuthnValidation**\
  To authenticate users using a Passkey you need to have a database connection. <https://docs.fortifiedid.se/tokens/>
* Enrollment -> Check out the Enrollment documentation.\
  To be able to authenticate you must have enrolled for a token.

## Configuration

{% hint style="info" %}
**Authenticator type:** `Passkey`
{% endhint %}

Common Authenticator configuration can be found [here](/access/key-components/authenticators/common-configuration.md).

{% tabs %}
{% tab title="Properties" %}

<table data-full-width="true"><thead><tr><th>Name</th><th>Description</th><th>Default value</th><th data-type="checkbox">Mandatory</th></tr></thead><tbody><tr><td>username_parameter</td><td>Name of the property to where the username is exported</td><td>username</td><td>false</td></tr><tr><td>namespace</td><td>Namespace used to communicate with other modules</td><td>default</td><td>false</td></tr><tr><td><code>webroot_dir</code></td><td>See common authenticator configuration</td><td>web/authenticator/webauthn</td><td>false</td></tr><tr><td><code>auto_start</code></td><td>If true, the authentication will start automatically when the user is presented with the UI (no click required)<br>If false, the user is presented with a button to start the authentication</td><td>true</td><td>false</td></tr></tbody></table>
{% endtab %}

{% tab title="Example" %}

```json
{
  "id": "passkey",
  "type": "Passkey",
  "config": {
    "base_path": "/saml/authn",
    "context_path": "/saml/authn/webauthn"
  }
}
```

{% endtab %}
{% endtabs %}

{% hint style="warning" %}
Property *base\_path* should not contain the full path when used in conjunction with the [Selector](/access/key-components/authenticators/flow-control/selector.md), instead, the full URI will be handled by the selector. The full path will be *base\_path + / + id*.
{% endhint %}

## Logging

* WEB\_100022("Passkey validated")
  * IDENTIFIER (user trace id)
  * CUSTOMER\_IDENTIFIER (if configured)
  * SOURCE\_ADDRESS (ip of the remote session)
* WEB\_100023("Passkey validation failed")
  * IDENTIFIER (user trace id)
  * CUSTOMER\_IDENTIFIER (if configured)
  * SOURCE\_ADDRESS (ip of the remote session)

## Global state

After successful authentiation, the authenticator populates the configured username property with the user identifier obtained during the Web Authentication process.

## API

The following documentation contains links to the document [**Web Authentication: An API for accessing Public Key Credentials Level 2,** W3C Recommendation, 8 April 2021](https://www.w3.org/TR/webauthn-2/).

### Begin authentication

Initialize a new authentication with the following request to the authenticator API:

```json
{
    "type": "options"
}
```

The server responds with a [PublicKeyCredentialRequestOptions](https://www.w3.org/TR/webauthn-2/#dictdef-publickeycredentialrequestoptions). Use the response to obtain a [AuthenticatorAssertionResponse](https://www.w3.org/TR/webauthn-2/#authenticatorassertionresponse), according to the Web Authentication specification, and return the assertion to the authenticator API:

```json
{
    "type": "verification",
    "data": {
        "assertion": <AuthenticatorAssertionResponse>
    }
}
```

The server responds with `AUTHORIZED` or `UNAUTHORIZED`:

```json
{
    "status": "AUTHORIZED|UNAUTHORIZED"
}
```

## Translation keys

```json
{
  "webauthn.start_validate": "Login",
  "webauthn.verifying": "Verifying passkey",
  "webauthn.verified": "Passkey verified",
  "webauthn.redirecting": "Redirecting...",
  "webauthn.validation_error.authenticator_failure": "Passkey authentication failed",
  "webauthn.validation_error.verification_failure": "Passkey verification failed",
  "webauthn.validation_error.unknown_error": "Unknown error",
  "webauthn.reset_button": "Go back",
  "allow-cookies-body": "To save your language settings on this device you need to approve a language cookie.",
  "allow-cookies-button": "Approve language cookie",
  "authentication.help_text": "",
  "change_language": "Change language"
}
```

```json
{
  "webauthn.start_validate": "Logga in",
  "webauthn.verifying": "Säkerhetsnyckel verifieras...",
  "webauthn.verified": "Säkerhetsnyckel verifierad",
  "webauthn.redirecting": "Omdirigerar...",
  "webauthn.validation_error.authenticator_failure": "Autenticering med säkerhetsnyckel misslyckades",
  "webauthn.validation_error.verification_failure": "Verifiering av säkerhetsnyckel misslyckades",
  "webauthn.validation_error.unknown_error": "Okänt fel inträffade",
  "webauthn.reset_button": "Gå tillbaka",
  "allow-cookies-body": "Vill du spara dina språkinställningar på denna enhet behövs ett godkännande av  språk-cookie.",
  "allow-cookies-button": "Godkänn språk-cookie",
  "authentication.help_text": "",
  "change_language": "Byt språk"
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.fortifiedid.se/access/key-components/authenticators/credential-validators/passkey-validator.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
