wooden-cartoon-49455
06/05/2025, 12:14 PMbrief-egg-61061
06/05/2025, 12:14 PMbrief-egg-61061
06/05/2025, 12:15 PMconfig.yml
for Kratos, enable the passkey strategy: yaml selfservice: methods: passkey: enabled: true config: rp: display_name: "Your Application Name" id: <http://your-domain.com|your-domain.com> origins: - <https://your-domain.com>
- `display_name`: What users see in the passkey prompt. - `id`: The top-level domain. - `origins`: The exact URLs where authentication is initiated (must include scheme, host, and port if not 443/80) [Passkeys with the dedicated passkey strategy](https://www.ory.sh/docs/kratos/passwordless/passkeys#passkeys-with-the-dedicated-passkey-strategy). ### Identity Schema If you use a custom identity schema, mark the field (e.g., email) as the display name for passkeys: json { "traits": { "email": { "type": "string", "format": "email", "<http://ory.sh/kratos|ory.sh/kratos>": { "credentials": { "passkey": { "display_name": true } } } } } }
[Identity schema example](https://www.ory.sh/docs/kratos/passwordless/passkeys#passkeys-with-the-dedicated-passkey-strategy) --- ## 4. Implementation for Each Platform ### Web - Use the browser’s built-in WebAuthn API. - Ory provides a JavaScript file (/.well-known/ory/webauthn.js
) to help with the flow. Add it to your login page and use the provided handlers to trigger passkey authentication [Custom UI integration](https://www.ory.sh/docs/kratos/bring-your-own-ui/custom-ui-advanced-integration#passwordless-authentication). ### iOS & Android - Native apps cannot use WebAuthn directly. Instead, open a browser window (e.g., using ASWebAuthenticationSession on iOS or Chrome Custom Tabs on Android) to perform the authentication flow. - After authentication, handle the redirect back to your app using Universal Links (iOS) or App Links (Android) [Social sign-in for native and mobile apps](https://www.ory.sh/docs/kratos/social-signin/native-apps). - You can use Ory’s [React Native reference implementation](https://github.com/ory/kratos-selfservice-ui-react-native) as a starting point for integrating authentication flows in mobile apps [React Native integration guide](https://www.ory.sh/docs/getting-started/integrate-auth/react-native). --- ## 5. User Experience - On all platforms, users will see a browser prompt to use a passkey (e.g., FaceID, TouchID, device PIN, or external security key). - Passkeys can be shared across devices within the same ecosystem (e.g., iCloud Keychain for Apple devices) or used cross-platform via BLE or QR code [Cross-Platform Passkeys](https://www.ory.sh/blog/overview-login-password-passkey-webauthn-totp-sso-faceid). --- ## 6. Important Notes - **WebAuthn does not work in native mobile apps directly**; always use a browser-based flow for passkey authentication on mobile. - Ensure your origins and redirect URIs are correctly configured for all platforms. - Test the flow on all target devices and browsers to ensure a smooth user experience. --- If you need more detailed code samples or have a specific framework in mind, let me know!wooden-cartoon-49455
06/05/2025, 1:24 PMwooden-cartoon-49455
06/05/2025, 1:25 PMbrief-egg-61061
06/05/2025, 1:25 PMbrief-egg-61061
06/05/2025, 1:25 PMconfig.yml
to enable the passkey strategy: yaml selfservice: methods: passkey: enabled: true config: rp: display_name: "Your Application Name" id: localhost origins: - <http://localhost:4455>
Make sure to restart Kratos after updating the configuration. [See configuration details](https://www.ory.sh/docs/kratos/passwordless/passkeys#passkeys-with-the-dedicated-passkey-strategy) --- ### 2. Prepare Your Identity Schema If you use a custom identity schema, ensure the field you want as the display name for passkeys is marked accordingly: json { "traits": { "email": { "type": "string", "format": "email", "<http://ory.sh/kratos|ory.sh/kratos>": { "credentials": { "passkey": { "display_name": true } } } } } }
[Identity schema example](https://www.ory.sh/docs/kratos/passwordless/passkeys#passkeys-with-the-dedicated-passkey-strategy) --- ### 3. Start the Self-Service Flow in Your Browser - Open your browser and navigate to your login or registration page (e.g., `http://localhost:4455/login`). - The UI should present an option to use a passkey (if you use Ory’s default UI or have implemented passkey support in your custom UI). --- ### 4. Complete the Flow - When you select the passkey option, your browser will prompt you to register or use a passkey (e.g., FaceID, TouchID, Windows Hello, or a security key). - Follow the browser prompts to complete registration or login. --- ### 5. Verify the Flow - On successful authentication, you should be redirected to your application’s dashboard or the configured return URL. - If there are errors, Kratos will return them in the flow response, and your UI should display them accordingly. --- Note: If you are building a custom UI, you may need to integrate the WebAuthn JavaScript API and handle the flow as described in the Ory documentation. The default Ory UI already supports passkeys if enabled in your configuration. --- This process allows you to test the full passkey flow end-to-end in your browser using your self-hosted Ory Kratos instance. If you need to see the exact API calls or want to use cURL for testing, let me know!wooden-cartoon-49455
06/05/2025, 1:48 PMpasskey:
enabled: true
config:
rp:
display_name: Test local env.
# Set 'id' to the top-level domain.
id: local.test.tech
# Set 'origin' to the exact URL of the page that prompts the user to use WebAuthn. You must include the scheme, host, and port.
origins:
- <http://resr.local.alx.tech:3000/login>
brief-egg-61061
06/05/2025, 1:48 PMbrief-egg-61061
06/05/2025, 1:48 PM"additionalProperties 'passkey' not allowed"
typically indicates an issue with your identity schema, not your Kratos configuration. This happens when you add a passkey
property to a field in your identity schema, but the schema does not allow additional properties. For example, if your identity schema looks like this: json { "traits": { "email": { "type": "string", "format": "email", "<http://ory.sh/kratos|ory.sh/kratos>": { "credentials": { "passkey": { "display_name": true } } } } } }
But you have "additionalProperties": false
set somewhere in your schema (often inside the traits
object), then any property not explicitly listed (like passkey
) will cause this error. How to fix: - Make sure that the <http://ory.sh/kratos|ory.sh/kratos>
extension is inside the email
property, not at the same level as traits
. - If you have "additionalProperties": false
in your schema, ensure that the <http://ory.sh/kratos|ory.sh/kratos>
property is explicitly allowed. Example fix: json { "type": "object", "properties": { "traits": { "type": "object", "properties": { "email": { "type": "string", "format": "email", "<http://ory.sh/kratos|ory.sh/kratos>": { "credentials": { "passkey": { "display_name": true } } } } }, "required": ["email"], "additionalProperties": false } } }
If you want to allow the <http://ory.sh/kratos|ory.sh/kratos>
property, you may need to adjust your schema to permit it as an additional property or explicitly define it. See the [Ory documentation on customizing identity schemas for passkeys](https://www.ory.sh/docs/kratos/manage-identities/customize-identity-schema#passkey-display-name) for more details. Summary: The error is not with your Kratos config, but with your identity schema's handling of additional properties. Adjust your schema as shown above to resolve the issue. [Reference: Passkey display name in identity schema](https://www.ory.sh/docs/kratos/manage-identities/customize-identity-schema#passkey-display-name)wooden-cartoon-49455
06/05/2025, 1:51 PMbrief-egg-61061
06/05/2025, 1:51 PMbrief-egg-61061
06/05/2025, 1:51 PM<http://ory.sh/kratos|ory.sh/kratos>
extension for the email
field. To enable passkey support, you need to add the passkey
property as shown in the Ory documentation. Also, ensure that the property name is exactly "<http://ory.sh/kratos|ory.sh/kratos>"
(not a URL or Markdown link). Here is how your email
field should look, based on the official documentation: json "email": { "type": "string", "format": "email", "title": "E-Mail", "<http://ory.sh/kratos|ory.sh/kratos>": { "credentials": { "password": { "identifier": true }, "webauthn": { "identifier": true }, "totp": { "account_name": true }, "passkey": { "display_name": true } }, "recovery": { "via": "email" }, "verification": { "via": "email" } }, "maxLength": 320 }
Key points: - The property must be "<http://ory.sh/kratos|ory.sh/kratos>"
, not "<http://ory.sh/kratos|ory.sh/kratos>"
. - Add the "passkey": { "display_name": true }
block under credentials
for the email
field. This matches the structure shown in the Ory documentation for enabling passkeys in your identity schema [Passkey display name](https://www.ory.sh/docs/kratos/manage-identities/customize-identity-schema#passkey-display-name) and [Passkeys with the dedicated passkey strategy](https://www.ory.sh/docs/kratos/passwordless/passkeys#passkeys-with-the-dedicated-passkey-strategy). If you update your schema as above, the "additionalProperties 'passkey' not allowed"
error should be resolved.wooden-cartoon-49455
06/05/2025, 1:54 PMbrief-egg-61061
06/05/2025, 1:54 PMbrief-egg-61061
06/05/2025, 1:55 PMwooden-cartoon-49455
06/05/2025, 2:11 PMbrief-egg-61061
06/05/2025, 2:11 PMbrief-egg-61061
06/05/2025, 2:11 PMwooden-cartoon-49455
06/06/2025, 11:28 AMbrief-egg-61061
06/06/2025, 11:28 AMbrief-egg-61061
06/06/2025, 11:28 AMwooden-cartoon-49455
06/06/2025, 11:42 AMbrief-egg-61061
06/06/2025, 11:42 AMbrief-egg-61061
06/06/2025, 11:43 AMwooden-cartoon-49455
06/06/2025, 12:31 PMlet opts = createData.credentialOptions
opts.publicKey.user.name = displayName
opts.publicKey.user.displayName = displayName
opts.publicKey.user.id = __oryWebAuthnBufferDecode(opts.publicKey.user.id)
opts.publicKey.challenge = __oryWebAuthnBufferDecode(
opts.publicKey.challenge,
)
brief-egg-61061
06/06/2025, 12:31 PMbrief-egg-61061
06/06/2025, 12:31 PMopts.publicKey.user.id
in the context of the webauthn.js
script or the passkey creation flow. However, based on the context provided in your code snippet and the general WebAuthn flow described in the Ory documentation, opts.publicKey.user.id
is likely a value used to uniquely identify the user during the WebAuthn registration process. In the WebAuthn standard, the user.id
field is a binary identifier that must be unique for each user within your application. The script decodes this value from a buffer before passing it to the WebAuthn API, which is a standard step in preparing the registration options for the browser's WebAuthn API. If you need more detailed or authoritative information about this field specifically in Ory's implementation, it is not available in the provided knowledge sources. For more details, you may want to consult the [official WebAuthn specification](https://w3c.github.io/webauthn/) or Ory's source code and documentation directly.wooden-cartoon-49455
06/09/2025, 8:08 AM/self-service/settings/browser
, /self-service/login/browser
, /self-service/registratio/browser
brief-egg-61061
06/09/2025, 8:08 AMbrief-egg-61061
06/09/2025, 8:08 AM/self-service/registration/browser
): Use this flow to allow new users to register with a passkey. This does not require the user to be authenticated. The registration flow can be initialized for browser-based clients, and the passkey method can be enabled as part of the registration process [Registration Flow](https://www.ory.sh/docs/kratos/self-service/flows/user-registration). 2. Login Flow (/self-service/login/browser
): Use this flow to allow existing users to log in using a passkey. The login flow supports multiple authentication methods, including passkey, and is intended for users who already have a passkey registered with their account [Login Flow](https://www.ory.sh/docs/kratos/self-service/flows/user-login). 3. Settings Flow (/self-service/settings/browser
): Use this flow to allow authenticated users to add (register) a new passkey to their existing account. The settings flow is only available to users who are already logged in [Settings Flow](https://www.ory.sh/docs/kratos/self-service/flows/user-settings#user-and-profile-settings-for-server-side-browser-clients). Summary Table: | Flow Type | Endpoint | When to Use | |--------------|---------------------------------------|--------------------------------------------------| | Registration | /self-service/registration/browser
| New user registering with a passkey | | Login | /self-service/login/browser
| Existing user logging in with a passkey | | Settings | /self-service/settings/browser
| Authenticated user adding a new passkey | These flows are the standard way to create and use passkeys in Ory Kratos for browser-based applications [Self-service flows overview](https://www.ory.sh/docs/kratos/self-service#performing-login-registration-settings--flows).brief-egg-61061
06/09/2025, 8:10 AMbrief-egg-61061
06/09/2025, 8:10 AM/self-service/registration/browser
): Use this flow to allow new users to register with a passkey. This flow does not require the user to be authenticated and is intended for new account creation using passkey as an authentication method [Registration](https://www.ory.sh/docs/kratos/self-service/flows/user-registration). - Login Flow (/self-service/login/browser
): Use this flow to allow existing users to log in with a passkey. This is for users who have already registered a passkey and want to authenticate using it [Login](https://www.ory.sh/docs/kratos/self-service/flows/user-login). - Settings Flow (/self-service/settings/browser
): Use this flow to allow authenticated users to add (register) a new passkey to their existing account. This flow is only available to users who are already logged in [User and profile settings](https://www.ory.sh/docs/kratos/self-service/flows/user-settings). These are the standard flows in Ory Kratos for creating and using passkeys in browser-based applications [Self-service flows](https://www.ory.sh/docs/kratos/self-service#performing-login-registration-settings--flows).brief-egg-61061
06/09/2025, 8:12 AMbrief-egg-61061
06/09/2025, 8:12 AM/self-service/registration/browser
): Use this flow to allow new users to register with a passkey. This is for users who do not yet have an account and want to use a passkey as their primary credential [Registration Flow](https://www.ory.sh/docs/kratos/self-service/flows/user-registration). - Login Flow (/self-service/login/browser
): Use this flow to allow existing users to log in with a passkey. This is for users who have already registered a passkey and want to authenticate using it [Login Flow](https://www.ory.sh/docs/kratos/self-service/flows/user-login). - Settings Flow (/self-service/settings/browser
): Use this flow to allow authenticated users to add (register) a new passkey to their existing account. This flow is only available to users who are already logged in [Settings Flow](https://www.ory.sh/docs/kratos/self-service/flows/user-settings). These flows are the standard way to create and use passkeys in Ory Kratos for browser-based applications [Self-service flows](https://www.ory.sh/docs/kratos/self-service#performing-login-registration-settings--flows).brief-egg-61061
06/09/2025, 8:15 AMbrief-egg-61061
06/09/2025, 8:15 AM/self-service/registration/browser
): Use this flow to allow new users to register with a passkey. This flow is intended for users who do not yet have an account and want to use a passkey as their primary credential [Registration](https://www.ory.sh/docs/kratos/self-service/flows/user-registration). - Login Flow (/self-service/login/browser
): Use this flow to allow existing users to log in with a passkey. This is for users who have already registered a passkey and want to authenticate using it [Login](https://www.ory.sh/docs/kratos/self-service/flows/user-login). - Settings Flow (/self-service/settings/browser
): Use this flow to allow authenticated users to add (register) a new passkey to their existing account. This flow is only available to users who are already logged in [Settings](https://www.ory.sh/docs/kratos/self-service/flows/user-settings). These are the standard flows in Ory Kratos for creating and using passkeys in browser-based applications [Self-service flows](https://www.ory.sh/docs/kratos/self-service#performing-login-registration-settings--flows).brief-egg-61061
06/09/2025, 8:18 AMbrief-egg-61061
06/09/2025, 8:18 AM/self-service/registration/browser
): Use this flow to allow new users to register with a passkey. This is for users who do not yet have an account and want to use a passkey as their primary credential [Registration](https://www.ory.sh/docs/kratos/self-service/flows/user-registration). - Login Flow (/self-service/login/browser
): Use this flow to allow existing users to log in with a passkey. This is for users who have already registered a passkey and want to authenticate using it [Login](https://www.ory.sh/docs/kratos/self-service/flows/user-login). - Settings Flow (/self-service/settings/browser
): Use this flow to allow authenticated users to add (register) a new passkey to their existing account. This flow is only available to users who are already logged in [Settings](https://www.ory.sh/docs/kratos/self-service/flows/user-settings). These flows are the standard way to create and use passkeys in Ory Kratos for browser-based applications [Self-service flows](https://www.ory.sh/docs/kratos/self-service#performing-login-registration-settings--flows).wooden-cartoon-49455
06/09/2025, 8:19 AMbrief-egg-61061
06/09/2025, 8:19 AMbrief-egg-61061
06/09/2025, 8:20 AM/self-service/registration/browser
flow works in Ory Kratos, and how you would create a passkey as part of this flow: --- ### What is /self-service/registration/browser
? This endpoint initializes a browser-based registration flow. It sets up all necessary cookies and anti-CSRF measures for secure registration. When you visit this endpoint, Kratos will redirect you (or respond with JSON if using AJAX) to your registration UI, including a flow
ID in the URL. This flow object contains all the information needed to render the registration form, including available methods like password, OIDC, or passkey if enabled [Registration Flow](https://www.ory.sh/docs/kratos/self-service/flows/user-registration). --- ### Steps to Create a Passkey During Registration 1. Initialize the Registration Flow Open the registration endpoint in your browser: GET /self-service/registration/browser
This will redirect you to your registration UI with a ?flow=<flow-id>
parameter [Create registration flow](https://www.ory.sh/docs/kratos/bring-your-own-ui/custom-ui-basic-integration#create-registration-flow). 2. Render the Registration Form Fetch the registration flow data using the flow ID: GET /self-service/registration/flows?id=<flow-id>
The response will include the available registration methods (e.g., password, passkey) and the required form fields [Get registration flow](https://www.ory.sh/docs/kratos/bring-your-own-ui/custom-ui-basic-integration#get-registration-flow). 3. User Chooses Passkey If passkey is enabled in your Kratos config and identity schema, the UI will present a passkey option. When the user selects this, your frontend should trigger the WebAuthn registration process using the options provided in the flow data. 4. Create the Passkey (WebAuthn Registration) The frontend uses the WebAuthn API (with the options from Kratos) to prompt the user to create a passkey (e.g., FaceID, TouchID, security key). The result is a credential that the browser returns to your frontend. 5. Submit the Registration Flow Send a POST request to: POST /self-service/registration?flow=<flow-id>
Include the passkey credential and any required traits (e.g., email) in the payload. The exact fields are specified in the flow’s ui.nodes
property [Submit registration flow](https://www.ory.sh/docs/kratos/bring-your-own-ui/custom-ui-basic-integration#submit-registration-flow). 6. Registration Complete If successful, Kratos creates the new user with the passkey as their credential and redirects them to the configured post-registration URL. --- Summary: - Start the flow at /self-service/registration/browser
- Render the form using the flow data - Let the user create a passkey via WebAuthn - Submit the result to Kratos to complete registration This is the standard, secure way to register a new user with a passkey in Ory Kratos [Self-service flows](https://www.ory.sh/docs/kratos/self-service#performing-login-registration-settings--flows).brief-egg-61061
06/09/2025, 8:20 AMbrief-egg-61061
06/09/2025, 8:20 AM/self-service/registration/browser
endpoint in Ory Kratos is used to initialize a browser-based registration flow. This flow is designed for new users to register, and it supports passkey (WebAuthn) as a registration method if enabled in your Kratos configuration and identity schema. ### Steps to Create a Passkey During Registration 1. Initialize the Registration Flow Open the registration flow by making a GET request to: /self-service/registration/browser
This will set the necessary cookies and anti-CSRF tokens. If accessed in a browser, it redirects to your registration UI with a flow
query parameter. If accessed via AJAX, it returns the flow data as JSON, including the available registration methods and required form fields [createBrowserRegistrationFlow](https://www.ory.sh/docs/kratos/reference/api). 2. Render the Registration Form Use the flow data (especially ui.nodes
) to render the registration form. If passkey is enabled, the form will include the option to register using a passkey. The fields and methods shown depend on your Kratos project configuration and identity schema [Custom UI with Ory Elements](https://www.ory.sh/docs/kratos/bring-your-own-ui/custom-ui-ory-elements#login-and-registration-pages). 3. User Initiates Passkey Registration When the user selects the passkey option, your frontend should use the WebAuthn API with the options provided in the flow data to prompt the user to create a passkey (e.g., using FaceID, TouchID, or a security key) [Passkeys & WebAuthN](https://www.ory.sh/docs/kratos/passwordless/passkeys). 4. Submit the Registration Data After the user completes the passkey creation, submit the registration form to the action URL provided in the flow data (typically /self-service/registration?flow=<flow-id>
). The payload should include the passkey credential and any required traits (such as email), as specified in the flow’s ui.nodes
[Submit registration flow](https://www.ory.sh/docs/kratos/bring-your-own-ui/custom-ui-basic-integration#submit-registration-flow). 5. Registration Completion If the registration is successful, Kratos will create the new user with the passkey as their credential and redirect them to the configured post-registration URL. Note: The exact fields and steps may vary depending on your identity schema and project configuration. Always use the flow data (ui.nodes
) to determine what needs to be rendered and submitted. For more details, see the [Ory Kratos registration flow documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-registration).brief-egg-61061
06/09/2025, 8:22 AMbrief-egg-61061
06/09/2025, 8:22 AM/self-service/registration/browser
endpoint in Ory Kratos is used to initialize a browser-based registration flow. This flow is designed for new users to register, and it supports passkey (WebAuthn) as a registration method if enabled in your Kratos configuration and identity schema. ### Steps to Create a Passkey During Registration 1. Initialize the Registration Flow Make a GET request to /self-service/registration/browser
. This sets up the necessary cookies and anti-CSRF tokens. If accessed in a browser, it redirects to your registration UI with a flow
query parameter. If accessed via AJAX, it returns the flow data as JSON, including available registration methods and required form fields [createBrowserRegistrationFlow](https://www.ory.sh/docs/kratos/reference/api). 2. Render the Registration Form Use the flow data (especially ui.nodes
) to render the registration form. If passkey is enabled, the form will include the option to register using a passkey. The fields and methods shown depend on your Kratos project configuration and identity schema [Create registration flow](https://www.ory.sh/docs/kratos/bring-your-own-ui/custom-ui-basic-integration#create-registration-flow). 3. User Initiates Passkey Registration When the user selects the passkey option, your frontend should use the WebAuthn API with the options provided in the flow data to prompt the user to create a passkey (e.g., using FaceID, TouchID, or a security key) [Passkeys & WebAuthN](https://www.ory.sh/docs/kratos/passwordless/passkeys). 4. Submit the Registration Data After the user completes the passkey creation, submit the registration form to the action URL provided in the flow data (typically /self-service/registration?flow=<flow-id>
). The payload should include the passkey credential and any required traits (such as email), as specified in the flow’s ui.nodes
[Submit registration flow](https://www.ory.sh/docs/kratos/bring-your-own-ui/custom-ui-basic-integration#submit-registration-flow). 5. Registration Completion If the registration is successful, Kratos will create the new user with the passkey as their credential and redirect them to the configured post-registration URL. Note: The exact fields and steps may vary depending on your identity schema and project configuration. Always use the flow data (ui.nodes
) to determine what needs to be rendered and submitted. For more details, see the [Ory Kratos registration flow documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-registration).brief-egg-61061
06/09/2025, 8:27 AMbrief-egg-61061
06/09/2025, 8:27 AM/self-service/registration/browser
): Use this flow to allow new users to register with a passkey. This is for users who do not yet have an account and want to use a passkey as their primary credential. The registration flow supports the passkey method if it is enabled in your configuration and identity schema [Registration](https://www.ory.sh/docs/kratos/self-service/flows/user-registration). - Login Flow (/self-service/login/browser
): Use this flow to allow existing users to log in with a passkey. This is for users who have already registered a passkey and want to authenticate using it. The login flow supports multiple authentication methods, including passkey, if enabled [Login](https://www.ory.sh/docs/kratos/self-service/flows/user-login). - Settings Flow (/self-service/settings/browser
): Use this flow to allow authenticated users to add (register) a new passkey to their existing account. This flow is only available to users who are already logged in [Settings](https://www.ory.sh/docs/kratos/self-service/flows/user-settings). These flows are the standard way to create and use passkeys in Ory Kratos for browser-based applications [Self-service flows](https://www.ory.sh/docs/kratos/self-service#performing-login-registration-settings--flows).wooden-cartoon-49455
06/09/2025, 8:31 AMbrief-egg-61061
06/09/2025, 8:31 AMbrief-egg-61061
06/09/2025, 8:31 AM/self-service/settings/browser
) provides the necessary UI nodes (such as "link" and "unlink") for these actions. However, on the mobile (API) side, this functionality is currently not available. According to the Ory documentation and GitHub issues, social sign-in linking and unlinking is not supported in API-based settings flows (which are used by native and mobile apps). The documentation explicitly states: > Social Sign In is not possible for API Clients. It will be possible in a future version, which is partially tracked as [kratos#273](https://github.com/ory/kratos/issues/273) [Link and unlink from Google, Facebook, GitHub, ..., OpenID Connect / OAuth 2.0](https://www.ory.sh/docs/kratos/self-service/flows/user-settings#link-and-unlink-from-google-facebook-github--openid-connect--oauth-20) Additionally, a GitHub issue confirms this limitation: > I believe this is a shortcoming of the API flows, and actually a missing feature. While we do support OIDC on native now, we never got around to also adding that support to the settings flow [Settings flow does not have link
option with OIDC & Password methods enabled](https://github.com/ory/kratos/issues/4185) Summary: - Browser: Use /self-service/settings/browser
for linking/unlinking OIDC providers. - Mobile/API: This feature is not currently supported for API-based flows. There is no official way to link or unlink OIDC providers from a native/mobile app at this time. If you need this feature for mobile, you will need to wait for future Ory Kratos releases that add support for OIDC linking/unlinking in API flows.brief-egg-61061
06/09/2025, 8:32 AMbrief-egg-61061
06/09/2025, 8:32 AM/self-service/settings/browser
) provides the necessary UI nodes for these actions. However, on the mobile (API) side, this functionality is currently not available. The Ory documentation explicitly states: > Social Sign In is not possible for API Clients. It will be possible in a future version, which is partially tracked as [kratos#273](https://github.com/ory/kratos/issues/273) [Link and unlink from Google, Facebook, GitHub, ..., OpenID Connect / OAuth 2.0](https://www.ory.sh/docs/kratos/self-service/flows/user-settings#link-and-unlink-from-google-facebook-github--openid-connect--oauth-20) Additionally, a GitHub issue confirms this limitation: > I believe this is a shortcoming of the API flows, and actually a missing feature. While we do support OIDC on native now, we never got around to also adding that support to the settings flow [Settings flow does not have link
option with OIDC & Password methods enabled](https://github.com/ory/kratos/issues/4185) In summary: - Browser: Use /self-service/settings/browser
for linking/unlinking OIDC providers. - Mobile/API: This feature is not currently supported for API-based flows. There is no official way to link or unlink OIDC providers from a native/mobile app at this time.brief-egg-61061
06/09/2025, 8:33 AMbrief-egg-61061
06/09/2025, 8:33 AM/self-service/settings/browser
) exposes the necessary UI nodes (such as "link" and "unlink") for these actions. However, on the mobile (API) side, this functionality is currently not available. The Ory documentation clearly states: > Social Sign In is not possible for API Clients. It will be possible in a future version, which is partially tracked as [kratos#273](https://github.com/ory/kratos/issues/273) [Link and unlink from Google, Facebook, GitHub, ..., OpenID Connect / OAuth 2.0](https://www.ory.sh/docs/kratos/self-service/flows/user-settings#link-and-unlink-from-google-facebook-github--openid-connect--oauth-20) Additionally, a GitHub issue confirms: > I believe this is a shortcoming of the API flows, and actually a missing feature. While we do support OIDC on native now, we never got around to also adding that support to the settings flow [Settings flow does not have link
option with OIDC & Password methods enabled](https://github.com/ory/kratos/issues/4185) In summary: - For browser-based applications, use /self-service/settings/browser
to link or unlink OIDC providers. - For mobile or native applications using the API flow, this feature is not currently supported. There is no official way to link or unlink OIDC providers from a native/mobile app at this time.brief-egg-61061
06/09/2025, 8:36 AMbrief-egg-61061
06/09/2025, 8:37 AM/self-service/settings/browser
) provides the necessary UI nodes for these actions. However, on the mobile (API) side, this functionality is currently not available. The Ory documentation explicitly states that: > Social Sign In is not possible for API Clients. It will be possible in a future version, which is partially tracked as [kratos#273](https://github.com/ory/kratos/issues/273) [Link and unlink from Google, Facebook, GitHub, ..., OpenID Connect / OAuth 2.0](https://www.ory.sh/docs/kratos/self-service/flows/user-settings#link-and-unlink-from-google-facebook-github--openid-connect--oauth-20) Additionally, a GitHub issue confirms this limitation: > I believe this is a shortcoming of the API flows, and actually a missing feature. While we do support OIDC on native now, we never got around to also adding that support to the settings flow [Settings flow does not have link
option with OIDC & Password methods enabled](https://github.com/ory/kratos/issues/4185) In summary: - Browser: Use /self-service/settings/browser
for linking/unlinking OIDC providers. - Mobile/API: This feature is not currently supported for API-based flows. There is no official way to link or unlink OIDC providers from a native/mobile app at this time.brief-egg-61061
06/09/2025, 8:44 AMbrief-egg-61061
06/09/2025, 8:45 AM/self-service/settings/browser
) exposes the necessary UI nodes (such as "link" and "unlink") for these actions. On the mobile (API) side, this functionality is currently not available. The Ory documentation explicitly states: > Social Sign In is not possible for API Clients. It will be possible in a future version, which is partially tracked as [kratos#273](https://github.com/ory/kratos/issues/273) This means that, at present, there is no supported way to link or unlink OIDC providers from a native or mobile app using the API-based settings flow. This limitation is also confirmed in community discussions and GitHub issues, where it is described as a missing feature in the API flows for native/mobile clients [Link and unlink from Google, Facebook, GitHub, ..., OpenID Connect / OAuth 2.0](https://www.ory.sh/docs/kratos/self-service/flows/user-settings#link-and-unlink-from-google-facebook-github--openid-connect--oauth-20) [Settings flow does not have link
option with OIDC & Password methods enabled](https://github.com/ory/kratos/issues/4185). Summary: - Browser: Use /self-service/settings/browser
for linking/unlinking OIDC providers. - Mobile/API: This feature is not currently supported for API-based flows. There is no official way to link or unlink OIDC providers from a native/mobile app at this time.wooden-cartoon-49455
06/09/2025, 8:46 AMbrief-egg-61061
06/09/2025, 8:46 AMbrief-egg-61061
06/09/2025, 8:46 AM/self-service/settings/browser
). For API clients (such as native mobile apps), this feature is not yet implemented: > Social Sign In is not possible for API Clients. It will be possible in a future version, which is partially tracked as [kratos#273](https://github.com/ory/kratos/issues/273) [Link and unlink from Google, Facebook, GitHub, ..., OpenID Connect / OAuth 2.0](https://www.ory.sh/docs/kratos/self-service/flows/user-settings#link-and-unlink-from-google-facebook-github--openid-connect--oauth-20) Additionally, this limitation is confirmed in community discussions and GitHub issues, where it is described as a missing feature for API/native flows [Settings flow does not have link
option with OIDC & Password methods enabled](https://github.com/ory/kratos/issues/4185). In summary: You cannot currently perform unlinking of OIDC providers in native apps using the API. This functionality is only available in the browser flow, and support for API/native flows is planned for a future release.wooden-cartoon-49455
06/09/2025, 8:52 AMbrief-egg-61061
06/09/2025, 8:52 AMbrief-egg-61061
06/09/2025, 8:53 AM/self-service/registration/browser
does not present any nodes for passkey creation or usage, there are a few possible reasons based on the knowledge sources: 1. Passkey Method Not Enabled in Configuration The passkey method must be explicitly enabled in your Kratos configuration. Your config.yml
should include: yaml selfservice: methods: passkey: enabled: true config: rp: display_name: "Your Application Name" id: <http://your-domain.com|your-domain.com> origins: - <https://your-domain.com>
If this is missing or misconfigured, passkey nodes will not appear in the registration flow [Passkeys with the dedicated passkey strategy](https://www.ory.sh/docs/kratos/passwordless/passkeys#passkeys-with-the-dedicated-passkey-strategy). 2. Identity Schema Not Configured for Passkey Your identity schema must specify which field is used as the passkey display name. For example: json { "traits": { "email": { "type": "string", "<http://ory.sh/kratos|ory.sh/kratos>": { "credentials": { "passkey": { "display_name": true } } } } } }
If this is not set, the passkey method will not be available in the registration flow [Passkey display name in identity schema](https://www.ory.sh/docs/kratos/passwordless/passkeys#passkeys-with-the-dedicated-passkey-strategy). 3. Kratos Version Passkey support is only available in newer versions of Kratos (v1.3.1 and later). If you are using an older version (e.g., v1.2.0), passkey nodes will not be present, as this feature is not supported in that version [Unable to use YubiKey with passkey strategy](https://github.com/ory/kratos/issues/4377). 4. Flow Initialization and UI Rendering Ensure you are correctly initializing the registration flow and rendering all nodes from the ui.nodes
array in your custom UI. If your UI only renders certain methods or fields, passkey nodes may be omitted even if they are present in the flow data [Custom UI integration](https://www.ory.sh/docs/kratos/bring-your-own-ui/custom-ui-advanced-integration#passwordless-authentication). If you have checked all of the above and passkey nodes still do not appear, it is likely due to version limitations or a misconfiguration in your identity schema or Kratos config. The knowledge sources do not provide additional troubleshooting steps beyond these points.brief-egg-61061
06/09/2025, 8:57 AMbrief-egg-61061
06/09/2025, 8:57 AM/self-service/registration/browser
): Use this flow to allow new users to register with a passkey. This is for users who do not yet have an account and want to use a passkey as their primary credential. The registration flow supports the passkey method if it is enabled in your configuration and identity schema [Registration](https://www.ory.sh/docs/kratos/self-service/flows/user-registration). - Login Flow (/self-service/login/browser
): Use this flow to allow existing users to log in with a passkey. This is for users who have already registered a passkey and want to authenticate using it. The login flow supports multiple authentication methods, including passkey, if enabled [Login](https://www.ory.sh/docs/kratos/self-service/flows/user-login). - Settings Flow (/self-service/settings/browser
): Use this flow to allow authenticated users to add (register) a new passkey to their existing account. This flow is only available to users who are already logged in [Settings](https://www.ory.sh/docs/kratos/self-service/flows/user-settings). These flows are the standard way to create and use passkeys in Ory Kratos for browser-based applications [Self-service flows](https://www.ory.sh/docs/kratos/self-service#performing-login-registration-settings--flows).brief-egg-61061
06/09/2025, 9:00 AMbrief-egg-61061
06/09/2025, 9:01 AM/self-service/settings/browser
) exposes the necessary UI nodes (such as "link" and "unlink") for these actions. On the mobile (API) side, this functionality is currently not available. The Ory documentation explicitly states: > Social Sign In is not possible for API Clients. It will be possible in a future version, which is partially tracked as [kratos#273](https://github.com/ory/kratos/issues/273) This means that, at present, there is no supported way to link or unlink OIDC providers from a native or mobile app using the API-based settings flow. This limitation is also confirmed in community discussions and GitHub issues, where it is described as a missing feature in the API flows for native/mobile clients [Link and unlink from Google, Facebook, GitHub, ..., OpenID Connect / OAuth 2.0](https://www.ory.sh/docs/kratos/self-service/flows/user-settings#link-and-unlink-from-google-facebook-github--openid-connect--oauth-20) [Settings flow does not have link
option with OIDC & Password methods enabled](https://github.com/ory/kratos/issues/4185). Summary: - Browser: Use /self-service/settings/browser
for linking/unlinking OIDC providers. - Mobile/API: This feature is not currently supported for API-based flows. There is no official way to link or unlink OIDC providers from a native/mobile app at this time.wooden-cartoon-49455
06/09/2025, 11:24 AMbrief-egg-61061
06/09/2025, 11:24 AMbrief-egg-61061
06/09/2025, 11:24 AMjs import { Configuration, FrontendApi } from "@ory/client" const frontend = new FrontendApi( new Configuration({ basePath: `https://${process.env.ORY_PROJECT_SLUG}.<http://projects.oryapis.com|projects.oryapis.com>`, }), ) export async function createRegistration() { return await frontend.createNativeRegistrationFlow() }
[Create registration flow](https://www.ory.sh/docs/kratos/bring-your-own-ui/custom-ui-basic-integration#create-registration-flow) And in Go: go flow, _, err := ory.FrontendApi.CreateNativeLoginFlow(ctx).Execute()
[Go SDK example](https://www.ory.sh/docs/kratos/sdk/go#frontend-api) Summary: - The Ory Kratos API allows you to create flows (and get flow IDs) via SDKs and direct API calls. - There is no official .NET/ASP.NET Core SDK mentioned in the knowledge sources. - If you are using ASP.NET Core, you can interact with the Ory Kratos REST API directly to create flows and obtain flow IDs, as shown in the cURL and other SDK examples. If you need to create a flow in ASP.NET Core, you would typically make an HTTP request to the relevant Ory Kratos endpoint (e.g., /self-service/registration/api
or /self-service/login/api
) and parse the response to get the flow ID [Registration for API clients](https://www.ory.sh/docs/kratos/self-service/flows/user-registration#registration-for-api-clients-and-clients-without-browsers).wooden-cartoon-49455
06/12/2025, 7:50 AMsettings:
ui_url: <https://local.alx.tech/settings>
privileged_session_max=0
Or without privileged_session_max_age
settings:
ui_url: <https://local.alx.tech/settings>
privileged_session_max=0
I ma interested in avoiding session checkbrief-egg-61061
06/12/2025, 7:50 AMbrief-egg-61061
06/12/2025, 7:50 AMprivileged_session_max_age
parameter under the settings
flow in your configuration. This parameter defines how long (after authentication) a session is considered "privileged" and can perform sensitive actions (like changing email or password) without requiring re-authentication. How to use it: yaml settings: ui_url: <https://local.alx.tech/settings> privileged_session_max_age: 0
- Setting privileged_session_max_age: 0
means the privileged session check is effectively **disabled**—users will not be required to re-authenticate to access privileged settings, regardless of how much time has passed since their last authentication. - If you omit the privileged_session_max_age
parameter, the default behavior applies (which is typically a set duration, such as 5 minutes or as defined by Ory's defaults). Important: - The parameter name must be privileged_session_max_age
, not privileged_session_max
. - Setting it to 0
disables the privileged session check, allowing users to access sensitive settings at any time during their session without re-authentication [Privileged sessions](https://www.ory.sh/docs/kratos/session-management/session-lifespan#privileged-sessions). Example: yaml selfservice: flows: settings: ui_url: <https://local.alx.tech/settings> privileged_session_max_age: 0
This configuration will avoid privileged session checks for the settings flow. If you do not set privileged_session_max_age
at all, the default privileged session duration will be used [Privileged sessions](https://www.ory.sh/docs/kratos/session-management/session-lifespan#privileged-sessions). --- Summary: - Use privileged_session_max_age: 0
to disable privileged session checks. - Do not use privileged_session_max
(it is not a valid parameter). - Omitting the parameter uses the default privileged session duration.wooden-cartoon-49455
06/12/2025, 7:57 AMbrief-egg-61061
06/12/2025, 7:57 AMbrief-egg-61061
06/12/2025, 7:57 AMselfservice.flows.settings.privileged_session_max_age: 0 ^-- expected string, but got number
means that the value for privileged_session_max_age
must be a string, not a number. In Ory Kratos configuration, durations should be specified as strings (e.g., "0s"
, "15m"
, "1h"
), not as plain numbers. How to fix: Change your configuration from: yaml selfservice: flows: settings: ui_url: <https://local.alx.tech/settings> privileged_session_max_age: 0
to: yaml selfservice: flows: settings: ui_url: <https://local.alx.tech/settings> privileged_session_max_age: "0s"
This will set the privileged session max age to zero seconds, which effectively disables the privileged session check, allowing users to access sensitive settings at any time during their session without re-authentication [Privileged sessions](https://www.ory.sh/docs/kratos/session-management/session-lifespan#privileged-sessions). If you omit the parameter, the default value will be used. Summary: - Use a string value for durations, e.g., "0s"
instead of 0
. - This matches the expected format in Ory Kratos configuration files.wooden-cartoon-49455
06/12/2025, 8:01 AMsettings:
ui_url: <https://my-app.com/user/settings>
lifespan: 1h
privileged_session_max_age: 1h
required_aal: aal1
brief-egg-61061
06/12/2025, 8:01 AMbrief-egg-61061
06/12/2025, 8:01 AMlifespan: 1h
parameter under the settings
flow defines how long a settings flow is valid after it is initiated. This means that once a user starts a settings flow (for example, to update their profile or credentials), they have 1 hour to complete the process before the flow expires and they would need to start a new one. This is separate from privileged_session_max_age
, which controls how long after authentication a session is considered privileged for sensitive actions, and from required_aal
, which sets the required Authenticator Assurance Level for the flow [Settings and profile updates](https://www.ory.sh/docs/kratos/self-service/flows/user-settings). If the user does not complete the settings flow within the specified lifespan
, the flow will expire and they will need to re-initiate it.wooden-cartoon-49455
06/12/2025, 8:03 AMbrief-egg-61061
06/12/2025, 8:03 AMbrief-egg-61061
06/12/2025, 8:04 AMlifespan
is not set for the settings flow in your Ory Kratos configuration, the system will use the default value defined by Ory Kratos. However, the exact default value is not explicitly stated in the provided knowledge sources. The documentation only mentions that you can set the lifespan
to control how long the user has to complete the flow, but does not specify what happens if it is omitted or what the default duration is [Settings and profile updates](https://www.ory.sh/docs/kratos/self-service/flows/user-settings). Summary: If you do not set lifespan
, Ory Kratos will use its internal default, but the knowledge sources do not specify what that default is.wooden-cartoon-49455
06/12/2025, 9:45 AM401 Unauthorized
with id: session_inactive
when calling the /self-service/settings
flow (browser) to link a Google account, even though the user has a valid active session(whoami
returns 200)
Reproduction Steps:
User logs in (browser flow), session is active, cookie ory_kratos_session=...
is present in all requests.
User opens the settings flow: GET /self-service/settings/browser
Kratos serves the settings form as expected.
User submits OIDC link request (via POST) using the flow.ui.action
and method=oidc
& link=google
Kratos responds with (after user selected his account on google page):
{
"error": {
"id": "session_inactive",
"code": 401,
"status": "Unauthorized",
"reason": "No active session was found in this request."
}
}
Really interesting issue that I don't know how to overcome (OIDC works perfectly for the login flow).
We are using self-hosted Ory Kratos v1.1.0. (edited)brief-egg-61061
06/12/2025, 9:45 AMbrief-egg-61061
06/12/2025, 9:45 AM401 Unauthorized
with id: session_inactive
when attempting to link an OIDC provider via the settings flow, despite having an active session—can be caused by several factors according to the Ory Kratos documentation and related issues. ### Key Points from Knowledge Sources 1. Session Requirement for Settings Flow The /self-service/settings
flow requires a valid, active session. If the session is missing, invalid, or not sent with the request (e.g., missing ory_kratos_session cookie), you will receive a session_inactive
error. The documentation states: > If this endpoint is called via an AJAX request, the response contains the flow without a redirect. In the case of an error, the error.id
of the JSON response body can be one of: > `session_inactive`: No Ory Session was found - sign in a user first. [Kratos API Reference – getSettingsFlow](https://www.ory.sh/docs/kratos/reference/api) 2. Browser Flow and Cookies For browser flows, the session cookie must be present and valid in all requests, including redirects and form submissions. If the session cookie is lost or not forwarded (for example, due to cross-origin issues, incorrect domain, or SameSite cookie settings), Kratos will not recognize the session. 3. OIDC Linking and Redirects When linking an OIDC provider, the flow involves a redirect to the provider (e.g., Google) and then back to Kratos. If the session cookie is not preserved throughout this process, Kratos will treat the request as unauthenticated and return session_inactive
. 4. Version Limitations You are using Ory Kratos v1.1.0. The knowledge sources indicate that OIDC and settings flows have seen improvements and bug fixes in later versions. Some issues with session handling during OIDC linking may be version-specific and resolved in newer releases [Settings flow does not have link
option with OIDC & Password methods enabled](https://github.com/ory/kratos/issues/4185). ### Troubleshooting Steps - Ensure the session cookie (ory_kratos_session
) is present and valid in all requests, including after the OIDC provider redirects back to your app. - Check your cookie settings: Make sure the domain, path, and SameSite attributes are set correctly so the cookie is sent on all relevant requests. - Review your Ory Kratos version: There may be bugs or missing features in v1.1.0 related to OIDC linking in the settings flow. Upgrading to a newer version may resolve the issue, as several improvements have been made in this area in later releases. - Check for cross-origin issues: If your app and Kratos are on different domains or ports, browser security policies may block cookies. ### Summary The session_inactive
error during OIDC linking in the settings flow is most likely due to the session cookie not being present or recognized after the OIDC redirect, or due to limitations/bugs in your current Kratos version. Double-check your cookie handling and consider upgrading Kratos if possible. The knowledge sources do not provide a specific workaround for v1.1.0, but these are the most relevant factors based on the documentation and known issues [Kratos API Reference – getSettingsFlow](https://www.ory.sh/docs/kratos/reference/api) [Settings flow does not have link
option with OIDC & Password methods enabled](https://github.com/ory/kratos/issues/4185).wooden-cartoon-49455
06/12/2025, 9:57 AMwooden-cartoon-49455
06/12/2025, 9:57 AMbrief-egg-61061
06/12/2025, 9:57 AMbrief-egg-61061
06/12/2025, 9:57 AM/sessions/whoami
and receiving a 200 response). --- ### Step 2: Initialize the Settings Flow - The user opens the settings page, which triggers a GET request to: /self-service/settings/browser
- Kratos responds with the settings flow, including the available methods and UI nodes (such as OIDC link/unlink options if configured). --- ### Step 3: User Initiates OIDC Linking - The user clicks the "link" button for the desired OIDC provider (e.g., Google). - Your frontend submits a POST request to the ui.action
URL from the flow, with: - method=oidc
- link=google
- Kratos redirects the user to the OIDC provider for authentication. --- ### Step 4: OIDC Provider Authentication - The user authenticates with the OIDC provider (e.g., selects their Google account). - The OIDC provider redirects the user back to Kratos (to the callback endpoint). --- ### Step 5: Kratos Completes the Linking - Kratos should process the callback, link the OIDC provider to the user's account, and redirect the user back to the settings UI (or show a success message). --- At each step, let me know: - What request you make - What response you get - If you see any errors or unexpected behavior This will help pinpoint where the flow diverges from the expected process described in the documentation [Link and unlink from Google, Facebook, GitHub, ..., OpenID Connect / OAuth 2.0](https://www.ory.sh/docs/kratos/self-service/flows/user-settings#link-and-unlink-from-google-facebook-github--openid-connect--oauth-20). Ready for step 1? Please confirm the user is authenticated and has a valid session.