fierce-pharmacist-13812
11/22/2024, 10:11 AMbrief-egg-61061
11/22/2024, 10:11 AMbrief-egg-61061
11/22/2024, 10:11 AMjson { "properties": { "traits": { "type": "object", "properties": { "phone": { "type": "string", "format": "tel", "<http://ory.sh/kratos|ory.sh/kratos>": { "credentials": { "password": { "identifier": true }, "code": { "identifier": true, "via": "sms" } }, "verification": { "via": "sms" } } } } } } }
This configuration tells Kratos to use the phone number as an identifier for password authentication and SMS code verification [Phone number and password](https://www.ory.sh/docs/kratos/manage-identities/customize-identity-schema#phone-number-and-password). 2. Make sure that your registration flow configuration in kratos.yml
is set up to handle phone numbers. You might need to enable the appropriate methods: yaml selfservice: methods: password: enabled: true code: enabled: true
3. If you're using SMS verification, ensure that you have configured an SMS courier channel as mentioned in the [Address verification documentation](https://www.ory.sh/docs/kratos/self-service/flows/verify-email-account-activation). 4. Double-check that your registration API payload is correctly formatted, sending the phone number in the expected format (e.g., "+1234567890"). If you've made these changes and are still encountering issues, it's possible that there might be a bug or configuration problem. In that case, you may want to: 1. Double-check all your configurations. 2. Ensure you're using the latest version of Ory Kratos. 3. If the problem persists, consider reaching out to the Ory community or support channels for further assistance. Remember, when working with phone numbers in Kratos, you need to be explicit about their use as identifiers and for verification purposes in your identity schema.fierce-pharmacist-13812
11/22/2024, 10:26 AMbrief-egg-61061
11/22/2024, 10:26 AMbrief-egg-61061
11/22/2024, 10:27 AMyaml selfservice: flows: verification: use: code enabled: true
2. SMS courier configuration: Ensure that you have properly set up an SMS courier channel. This is crucial for SMS verification to work correctly. You can find more information on how to configure this in the [SMS documentation](https://www.ory.sh/docs/kratos/emails-sms/sending-sms). 3. Known issue: There's a reported issue in Ory Kratos where the API might still return email attributes in the UI node instead of phone number attributes, even when configured for SMS verification. This is documented in a [GitHub issue](https://github.com/ory/kratos/issues/3799). 4. API usage: When creating a verification flow for phone numbers, make sure you're using the correct API endpoint and parameters. The issue might be related to how the API is being called. 5. Version check: Ensure you're using the latest version of Ory Kratos, as some issues might have been resolved in recent updates. If you've checked all these points and are still encountering the "is not an email" error, it might be worth reaching out to the Ory community or support channels with specific details about your configuration and the exact API calls you're making. There might be a subtle configuration issue or a potential bug that needs further investigation. Remember, phone number verification in Ory Kratos can be complex due to the various configuration points involved. Sometimes, a small misconfiguration can lead to unexpected behavior.