Passwordless sign-in and sign-up with passkeys | Ory
Ory Kratos Passwordless Sign-in with Passkeys
Ory Kratos supports passwordless sign-in with passkeys, built on the WebAuthn standard. The Web Authentication Browser API (WebAuthn) is a specification written by W3C and FIDO. The WebAuthn API allows servers to register and authenticate users using public key cryptography instead of passwords.
Passkeys use the WebAuthn standard to generate and manage cryptographic key pairs for users. Passkeys are, as described by the FIDO Alliance, "a password replacement that provides faster, easier, and more secure sign-ins to websites and apps across a user's devices."
Passkeys
Passkeys are a method for registering and signing in users without passwords. Passkeys are an industry-accepted and adopted standard, which means that all of your users will be able to use this feature, no matter the hardware they work with.
Notable adopters of passkeys include:
- Apple with Apple Passkeys
- Microsoft
- Meta
While companies can add proprietary features to passkeys, such as iCloud synchronization in Apple Passkeys or Google Password Manager synchronization for Android devices, all of them use the same FIDO standard. This means that enabling passkeys is a simple, one-time operation in Ory.
Tip: To learn more about passkeys and see sample flows for different platforms, watch this FIDO Alliance video:
Passkeys in Action FIDO Alliance Demo Video
Choose passkey strategy
Ory Network implements a dedicated passkey strategy that improves the ergonomics over using the webauthn strategy for first-factor login. Here is a comparison of the two approaches:
| Webauthn passwordless login | Passkey strategy | |
|---|---|---|
| Discoverable credentials: The browser automatically discovers which credentials the user has stored for the site. | ❌ | ✔︎ |
| Conditional UI: The browser attaches an autofill dropdown to the email field that allows the user to select a passkey. | ❌ | ✔︎ |
| Backwards compatibility: Works for users that have a passkey configured with the WebAuthN strategy. | ✔︎ | ❌ |
Passkeys with the dedicated passkey strategy
Configuration
By default, the passkey strategy is disabled. To enable it in the Ory Network, go to Authentication → Passwordless login in the Ory Console and toggle the switch for Enable Passkey authentication.
Alternatively, use the Ory CLI to enable the passkey strategy:
ory patch identity-config <your-project-id> \
--add '/selfservice/methods/passkey/enabled=true' \
--add '/selfservice/methods/passkey/config/rp/display_name="My Display Name"'
Advanced configuration
The passkey strategy exposes additional settings that control the WebAuthn ceremony. All are optional and existing passkey credentials keep working. One default changed — see the note on authenticator attachment below.
| Option | Type | Default | What it controls |
|---|---|---|---|
authenticator_selection.attachment |
string | unset | Restricts eligible authenticators by attachment modality: "platform" (Touch ID, Windows Hello) or "cross-platform" (HID tokens, YubiKeys). Omit this field to accept either type. |
authenticator_selection.resident_key |
string | "required" |
Whether the authenticator must create a client-side discoverable credential: "required", "preferred", or "discouraged". |
authenticator_selection.user_verification |
string | "preferred" |
Whether biometrics or a PIN are required: "required", "preferred", or "discouraged". |
attestation.preference |
string | "none" |
Attestation conveyance preference that Ory Kratos requests from the authenticator: "none", "indirect", "direct", or "enterprise". Request hint only — Ory Kratos does not verify or enforce the returned attestation statement, so it cannot restrict registration to specific authenticator types or models. Most consumer passkeys (iOS, Android) support only "none"; requesting "direct" or "enterprise" may not be honored. |
timeouts.registration |
duration | library default | Timeout for the registration ceremony, in Go duration format (for example "60s" or "5m"). The browser enforces this during the ceremony; Ory Kratos does not reject late responses server-side — the flow lifespan (selfservice.flows.*.lifespan) governs server-side validity. When unset, the library default applies: 5 minutes, or 2 minutes when user_verification is set to "discouraged". |
timeouts.login |
duration | library default | Timeout for the login ceremony, in Go duration format. The browser enforces it like timeouts.registration. When unset, the library default applies: 5 minutes, or 2 minutes when user_verification is set to "discouraged". |
Note: Default behavior change: Earlier versions of the passkey strategy hardcoded attachment: platform, so only built-in authenticators (Touch ID, Windows Hello) could be registered. The strategy now defaults to no attachment preference, which means users can register using either platform or cross-platform (roaming) authenticators.
Implementing passkeys in your application
After configuring passkeys, you need to integrate them into your application. The implementation differs depending on your platform:
- Web applications can use Ory's
webauthn.jshelper script or manually integrate the WebAuthn API. - Mobile applications (iOS and Android) require platform-specific credential management APIs and direct integration with Ory's JSON API endpoints.
See Implementing passkeys for web and mobile for detailed implementation instructions, code examples, and best practices for both web and mobile platforms.
Passkeys with the WebAuthN strategy
Configuration
To allow using passkeys, enable passwordless login. To do that in the Ory Network, go to Authentication → Passwordless login in the Ory Console and toggle the switch to enable the feature.
Example
This is a macOS Safari prompt the browser shows when users try to sign in using the passwordless method. The first option allows to use a passkey associated with this account that's stored in the iCloud Keychain of the user that's signed in to iCloud on this device.
WebAuthn
Note: Please use the PassKey method instead. This is documented for legacy reasons.
WebAuthn is commonly used with:
- USB, NFC or Bluetooth Low Energy devices, for example YubiKey
- Built-in OS biometric authentication platforms such as TouchID, FaceID, Windows Hello, Android Biometric Authentication
When the end-user triggers the WebAuthn process, the browser shows WebAuthn prompt. The prompt looks different depending on the used browser. This is a Chrome example:
Tip: Ory's WebAuthn implementation can be used for both multi-factor authentication and passwordless authentication. You need to configure whether WebAuthn is used for passwordless or for multi-factor authentication.
Constraints
- WebAuthn is a browser standard. It does not work in native mobile apps.
- WebAuthn is limited to one domain and does not work in a local environment when using CNAME / Ory Tunnel.
- Implementing WebAuthn in your own UI can be challenging, depending on which framework to use.