Skip to main content

providers/passkey

Built-in Passkey integration.

default()

default(config): WebAuthnConfig

Add Passkey login to your page.

Setup

Install the required peer dependency.

npm install @simplewebauthn/browser

Configuration

import { Auth } from "@auth/core"
import Passkey from "@auth/core/providers/passkey"

const request = new Request(origin)
const response = await Auth(request, {
providers: [Passkey],
})

Resources

Notes

This provider is an extension of the WebAuthn provider that defines some default values associated with Passkey support. You may override these, but be aware that authenticators may not recognize your credentials as Passkey credentials if you do.

tip

The Passkey provider comes with a default configuration. To override the defaults for your use case, check out customizing a built-in WebAuthn provider.

Disclaimer

If you think you found a bug in the default configuration, you can open an issue.

Auth.js strictly adheres to the specification and it cannot take responsibility for any deviation from the spec by the provider. You can open an issue, but if the problem is non-compliance with the spec, we might not pursue a resolution. You can ask for more help in Discussions.

Parameters

config: Partial< WebAuthnConfig >

Returns

WebAuthnConfig