kratos
kratos copied to clipboard
OIDC signing up flow crashes when a required field isn't provided
Preflight checklist
- [X] I could not find a solution in the existing issues, docs, nor discussions.
- [X] I agree to follow this project's Code of Conduct.
- [X] I have read and am following this repository's Contribution Guidelines.
- [ ] This issue affects my Ory Cloud project.
- [ ] I have joined the Ory Community Slack.
- [ ] I am signed up to the Ory Security Patch Newsletter.
Describe the bug
When there's a field in the schema which is required, but the value that is obtained from the claims is actually empty (so the field isn't set after applying the jsonnet file), the flow crashes with a schema validation error (the error message is missing properties: "property_name"). Not sure whether the issue is relevant to kratos or kratos-selfservice-ui-node, but since the property isn't provided, kratos-selfservice-ui-node should ask to provide it instead of interrupting the flow.
Reproducing the bug
Don't provide a required property in the traits, or provide a value of a string property with a length < minLength.
Relevant log output
time=2022-08-11T00:00:00Z level=info msg=Encountered self-service flow error. func=github.com/ory/kratos/selfservice/flow/registration.(*ErrorHandler).WriteFlowError file=/project/selfservice/flow/registration/error.go:76 audience=audit error=map[message:I[#/traits] S[#/properties/traits/required] missing properties: "property_name"
Relevant configuration
kratos with kratos-selfservice-ui-node
Version
v0.10.1
On which operating system are you observing this issue?
Linux
In which environment are you deploying?
Docker Compose
Additional Context
No response