rough-kilobyte-98919
08/06/2025, 7:53 AMproperties.traits.properties.phone: map[format:tel <http://ory.sh/kratos:map|ory.sh/kratos:map>[credentials:map[code:map[identifier:true via:sms]] recovery:map[via:sms] verification:map[via:sms]] title:Phone number type:string]
brief-egg-61061
08/06/2025, 7:53 AMbrief-egg-61061
08/06/2025, 7:53 AMrecovery: { via: "sms" }
for the phone
trait. Ory Kratos currently only supports recovery via email, not SMS. The value for recovery.via
must be "email"
, not "sms"
. This is confirmed by the error message: properties.traits.properties.phone.ory\.sh/kratos.recovery.via: sms ^-- value must be "email"
and by user and maintainer comments in the referenced GitHub issue, which clarify that the schema extension for recovery does not support "sms"
as a value. If you remove the recovery: { via: "sms" }
or change it to recovery: { via: "email" }
, the error will disappear. The documentation may be unclear on this point, but the product currently enforces this restriction for recovery flows [[Setting up identity schema with "Recovery via SMS" throwing error](https://github.com/ory/kratos/issues/4262)]. Summary: You cannot use SMS for account recovery in Ory Kratos; only email is supported for the recovery.via
field.rough-kilobyte-98919
08/06/2025, 7:54 AMbrief-egg-61061
08/06/2025, 7:54 AMbrief-egg-61061
08/06/2025, 7:54 AM"via": "sms"
. For example: json { "phone": { "type": "string", "title": "Phone number", "format": "tel", "<http://ory.sh/kratos|ory.sh/kratos>": { "verification": { "via": "sms" } } } }
You must also configure an SMS channel in your Ory setup to deliver the verification codes via SMS. This is documented in the official guides and confirmed by multiple sources. Make sure your configuration matches the requirements for SMS delivery and that the verification flow is enabled in your project settings [Phone number verification](https://www.ory.sh/docs/kratos/self-service/flows/verify-email-account-activation#phone-number-verification) [Customize identity schemas](https://www.ory.sh/docs/kratos/manage-identities/customize-identity-schema#identity-schema-extensions). Note: - Recovery via SMS is not supported, but verification via SMS is. - If you encounter issues, ensure you are not using deprecated parameters and that your Ory version supports the features you are configuring.rough-kilobyte-98919
08/06/2025, 8:03 AMbrief-egg-61061
08/06/2025, 8:03 AMbrief-egg-61061
08/06/2025, 8:04 AM"recovery"
block from your identity schema for that trait. The "recovery"
extension is only required if you want that field to be used for account recovery flows. If you omit it, Ory Kratos will not use that trait for recovery, and you will not be able to recover accounts using that field. This approach is supported by the documentation, which states that you specify which fields are used for recovery by including the "recovery"
extension in the schema. If you do not include it, that field will not be used for recovery [Customize identity schemas](https://www.ory.sh/docs/kratos/manage-identities/customize-identity-schema#identity-schema-extensions). So, you can safely remove the "recovery"
block if you do not need recovery functionality for that trait.