orange-rose-10706
12/03/2024, 8:57 PMbrief-egg-61061
12/03/2024, 8:57 PMbrief-egg-61061
12/03/2024, 8:57 PMorange-rose-10706
12/03/2024, 8:58 PMorange-rose-10706
12/03/2024, 8:59 PMbrief-egg-61061
12/03/2024, 8:59 PMbrief-egg-61061
12/03/2024, 9:00 PMory patch identity-config <your-project-id> \
--add '/selfservice/methods/passkey/enabled=true' \
--add '/selfservice/methods/passkey/config/rp/display_name="My Display Name"'
2. Update the identity schema:
Ensure that your identity schema includes the passkey configuration. Here's an example of how to add passkey support to a trait in your schema [as shown in the Ory documentation](https://www.ory.sh/docs/kratos/manage-identities/customize-identity-schema#username-and-email-and-password):
json
{
"type": "string",
"<http://ory.sh/kratos|ory.sh/kratos>": {
"credentials": {
"passkey": {
"display_name": true
}
}
}
}
3. Check for configuration errors:
Review your configuration for any errors. The [GitHub issue discussion](https://github.com/ory/kratos/discussions/3931) shows an example of configuration errors related to passkeys. Make sure your configuration doesn't have any syntax errors or invalid properties.
4. Verify the passkey strategy is active:
In your registration flow API call, check if the passkey
method is listed in the available methods. If it's not, double-check your configuration and ensure that the passkey strategy is enabled and properly configured.
5. Use the latest SDK version:
Ensure you're using the latest version of the Ory SDK in your application. The [GitHub issue](https://github.com/ory/network/issues/385) mentions using version 1.9.0 of @ory/client
, but you should check for any newer versions that might include fixes or improvements for passkey support.
6. Check for conflicts with other authentication methods:
If you're using multiple authentication methods, ensure they're not conflicting with each other. The [Ory documentation on passkeys](https://www.ory.sh/docs/kratos/passwordless/passkeys#choose-passkey-strategy) mentions that there might be compatibility issues between the WebAuthn strategy and the dedicated passkey strategy.brief-egg-61061
12/03/2024, 9:00 PMory patch identity-config <your-project-id> \ --add '/selfservice/methods/passkey/enabled=true' \ --add '/selfservice/methods/passkey/config/rp/display_name="My Display Name"'
2. Update the identity schema: Ensure that your identity schema includes the passkey configuration. Here's an example of how to add passkey support to a trait in your schema [as shown in the Ory documentation](https://www.ory.sh/docs/kratos/manage-identities/customize-identity-schema#username-and-email-and-password): json { "type": "string", "<http://ory.sh/kratos|ory.sh/kratos>": { "credentials": { "passkey": { "display_name": true } } } }
3. Check for configuration errors: Review your configuration for any errors. The [GitHub issue discussion](https://github.com/ory/kratos/discussions/3931) shows an example of configuration errors related to passkeys. Make sure your configuration doesn't have any syntax errors or invalid properties. 4. Verify the passkey strategy is active: In your registration flow API call, check if the passkey
method is listed in the available methods. If it's not, double-check your configuration and ensure that the passkey strategy is enabled and properly configured. 5. Use the latest SDK version: Ensure you're using the latest version of the Ory SDK in your application. The [GitHub issue](https://github.com/ory/network/issues/385) mentions using version 1.9.0 of @ory/client
, but you should check for any newer versions that might include fixes or improvements for passkey support. 6. Check for conflicts with other authentication methods: If you're using multiple authentication methods, ensure they're not conflicting with each other. The [Ory documentation on passkeys](https://www.ory.sh/docs/kratos/passwordless/passkeys#choose-passkey-strategy) mentions that there might be compatibility issues between the WebAuthn strategy and the dedicated passkey strategy. If you've followed these steps and are still not seeing the passkey option in your registration flow, it's possible that there might be a bug or an issue with the Ory Network configuration. In this case, I recommend reaching out to Ory support or posting a detailed description of your issue, including your configuration (with sensitive information redacted) and the API response you're receiving, on the [Ory Community Slack](https://slack.ory.sh) or the Ory GitHub repository for further assistance.orange-rose-10706
12/03/2024, 9:49 PMbrief-egg-61061
12/03/2024, 9:49 PMbrief-egg-61061
12/03/2024, 9:49 PMDANGER Never use API flows to implement Browser applications! Using API flows in Single-Page-Apps as well as server-side apps opens up several potential attack vectors, including Login and other CSRF attacks.
This warning suggests that certain security features, including passkeys, may not be available or may work differently in API flows compared to browser flows. Furthermore, the [Ory documentation on WebAuthn constraints](https://www.ory.sh/docs/kratos/passwordless/passkeys#constraints) mentions: - WebAuthn is a browser standard. It does not work in native mobile apps.
While this specifically mentions WebAuthn, passkeys are built on the WebAuthn standard, so this limitation likely applies to passkeys as well. To address this issue, you have a few options: 1. Use a browser-based flow: If possible, consider using a browser-based flow for registration in your React Native app. This could involve opening a web view or the device's default browser to handle the registration process. 2. Implement a custom solution: You might need to implement a custom solution for handling passkeys in your React Native app. This could involve using platform-specific APIs to interact with the device's security features. 3. Use an alternative authentication method: If passkeys are not critical for your app's security model, you might consider using an alternative authentication method that is fully supported in API flows. 4. Contact Ory support: Given that passkeys are a relatively new feature, it's possible that support for them in API flows is planned but not yet implemented. You might want to reach out to Ory support or check their roadmap to see if this feature is coming soon. For the most up-to-date and accurate information, I recommend reaching out to Ory support directly or posting your question on the [Ory Community Slack](https://slack.ory.sh). They would be able to provide more specific guidance based on the current state of passkey support in Ory Network for React Native applications.orange-rose-10706
12/03/2024, 9:51 PMbrief-egg-61061
12/03/2024, 9:51 PMbrief-egg-61061
12/03/2024, 9:51 PMorange-rose-10706
12/03/2024, 9:54 PMbrief-egg-61061
12/03/2024, 9:54 PMbrief-egg-61061
12/03/2024, 9:54 PMorange-rose-10706
12/03/2024, 11:05 PMbrief-egg-61061
12/03/2024, 11:05 PMbrief-egg-61061
12/03/2024, 11:05 PMory patch identity-config <your-project-id> \
--add '/selfservice/methods/passkey/enabled=true' \
--add '/selfservice/methods/passkey/config/rp/display_name="My Display Name"'
2. Update Identity Schema:
Make sure your identity schema includes the passkey configuration. Add the following to the relevant trait in your schema, as shown in the [Ory documentation on customizing identity schemas](https://www.ory.sh/docs/kratos/manage-identities/customize-identity-schema#passkey-display-name):
json
{
"<http://ory.sh/kratos|ory.sh/kratos>": {
"credentials": {
"passkey": {
"display_name": true
}
}
}
}
3. Initiate Passkey Registration:
To add a passkey to an existing identity, you need to initiate a registration flow for the passkey. This is typically done through a user interface where the user can choose to add a passkey.
4. Use the Registration API:
When the user initiates the passkey addition, your application should make a call to the registration flow API. The response will include a passkey_register
field with the necessary information to complete the passkey registration.
5. Complete Passkey Registration:
Use the information from the passkey_register
field to complete the WebAuthn registration process in the browser. This involves calling the browser's WebAuthn API to create the passkey.
6. Submit Passkey Data:
After the passkey is created, submit the passkey data back to Ory to associate it with the user's identity. This is done by sending a request to update the registration flow, including the passkey_register
data in the request body.
Here's an example of what the request body might look like when submitting the passkey data, based on the [Ory API reference](https://www.ory.sh/docs/reference/api):
json
{
"method": "passkey",
"passkey_register": "...", // The JSON returned by the WebAuthn registration process
"traits": {
// Include any required identity traits here
}
}
It's important to note that this process typically requires browser interaction, as passkeys rely on the WebAuthn API, which is a browser standard. If you're working with a native mobile app, you might need to use a WebView or consider alternative authentication methods.brief-egg-61061
12/03/2024, 11:05 PMory patch identity-config <your-project-id> \ --add '/selfservice/methods/passkey/enabled=true' \ --add '/selfservice/methods/passkey/config/rp/display_name="My Display Name"'
2. Update Identity Schema: Make sure your identity schema includes the passkey configuration. Add the following to the relevant trait in your schema, as shown in the [Ory documentation on customizing identity schemas](https://www.ory.sh/docs/kratos/manage-identities/customize-identity-schema#passkey-display-name): json { "<http://ory.sh/kratos|ory.sh/kratos>": { "credentials": { "passkey": { "display_name": true } } } }
3. Initiate Passkey Registration: To add a passkey to an existing identity, you need to initiate a registration flow for the passkey. This is typically done through a user interface where the user can choose to add a passkey. 4. Use the Registration API: When the user initiates the passkey addition, your application should make a call to the registration flow API. The response will include a passkey_register
field with the necessary information to complete the passkey registration. 5. Complete Passkey Registration: Use the information from the passkey_register
field to complete the WebAuthn registration process in the browser. This involves calling the browser's WebAuthn API to create the passkey. 6. Submit Passkey Data: After the passkey is created, submit the passkey data back to Ory to associate it with the user's identity. This is done by sending a request to update the registration flow, including the passkey_register
data in the request body. Here's an example of what the request body might look like when submitting the passkey data, based on the [Ory API reference](https://www.ory.sh/docs/reference/api): json { "method": "passkey", "passkey_register": "...", // The JSON returned by the WebAuthn registration process "traits": { // Include any required identity traits here } }
It's important to note that this process typically requires browser interaction, as passkeys rely on the WebAuthn API, which is a browser standard. If you're working with a native mobile app, you might need to use a WebView or consider alternative authentication methods. For the most accurate and up-to-date information, especially if you encounter any issues during implementation, I recommend consulting the [Ory documentation](https://www.ory.sh/docs/) or reaching out to Ory support directly.orange-rose-10706
12/03/2024, 11:15 PMbrief-egg-61061
12/03/2024, 11:15 PMbrief-egg-61061
12/03/2024, 11:15 PMory patch project --project <project-id> --workspace <workspace-id> \
--replace '/services/identity/config/selfservice/flows/registration/login_hints=true'
4. Check Identity Schema:
Ensure your identity schema correctly supports passkeys and that it's properly configured for existing accounts to add passkeys.
5. Review Error Handling:
If you're building a custom UI, make sure you're properly handling and displaying errors from the Ory API. The error message you're seeing might be a default message that doesn't accurately reflect the actual issue.
If you continue to experience issues after trying these steps, it would be advisable to reach out to Ory support directly or post a detailed description of your problem, including your configuration (with sensitive information redacted) and the exact API calls you're making, on the [Ory Community Slack](https://slack.ory.sh) for more specific assistance.brief-egg-61061
12/03/2024, 11:15 PMory patch project --project <project-id> --workspace <workspace-id> \ --replace '/services/identity/config/selfservice/flows/registration/login_hints=true'
4. Check Identity Schema: Ensure your identity schema correctly supports passkeys and that it's properly configured for existing accounts to add passkeys. 5. Review Error Handling: If you're building a custom UI, make sure you're properly handling and displaying errors from the Ory API. The error message you're seeing might be a default message that doesn't accurately reflect the actual issue. If you continue to experience issues after trying these steps, it would be advisable to reach out to Ory support directly or post a detailed description of your problem, including your configuration (with sensitive information redacted) and the exact API calls you're making, on the [Ory Community Slack](https://slack.ory.sh) for more specific assistance. Remember, the exact solution may depend on your specific Ory configuration and how you're implementing the passkey addition flow in your application.