echoing-forest-51816
09/06/2022, 9:04 PMjson
{
"title": "Person",
"type": "object",
"properties": {
"traits": {
"type": "object",
"properties": {
"username": {
"type": "string",
"title": "Username",
"maxLength": 40,
"<http://ory.sh/kratos|ory.sh/kratos>": {
"credentials": {
"password": {
"identifier": true
},
"webauthn": {
"identifier": true
},
"totp": {
"account_name": true
}
}
}
},
"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
}
},
"recovery": {
"via": "email"
},
"verification": {
"via": "email"
}
},
"maxLength": 320
}
},
"anyOf": [
{
"required": [
"email"
]
},
{
"required": [
"username"
]
}
],
"additionalProperties": false
}
}
}
I assumed “anyOf” would do the job, however when I register with a username and try to add an email in the account settings, it throws valid against schemas at indexes 0 and 1
. (As I'm currently still using the default UI of ory, it even renders a random input text box for “traits”: https://i.imgur.com/8PMpl1S.png▾
echoing-forest-51816
09/06/2022, 9:39 PMbland-eye-99092
09/07/2022, 2:56 PMechoing-forest-51816
09/07/2022, 4:40 PM