kratos icon indicating copy to clipboard operation
kratos copied to clipboard

OIDC signing up flow crashes when a required field isn't provided

Open renom opened this issue 3 years ago • 0 comments

Preflight checklist

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

renom avatar Aug 11 '22 09:08 renom