I defined the field “consent” in the file identity.traits.schema.json
in order to record that the user has agreed to the terms of conditions of my app. I did it as so:
{
...
"properties": {
...
"traits": {
...
"properties": {
...
"consent": {
"type": "boolean"
}
},
"required": [
...
"consent"
],
}
}
}
The response I get from /self-service/browser/flows/requests/registration
provided me this information about for the above field:
...
"traits.consent": {
"name": "traits.consent",
"type": "checkbox"
}
However, upon submitting when there is another error in the form (e.g., missing field), I get this response:
...
"traits.consent": {
"name": "traits.consent",
"type": "text",
"value": "on",
"messages": [
{
"id": 4000001,
"text": "expected boolean, but got string",
"type": "error"
}
]}
}
For some reason, the type has changed to “text” and the value to “on”, but the error indicates that a boolean value is still expected.
Am I doing something wrong?