Email field type changes on second request for request context during registration flow #670
Labels
bug
Something is not working.
corp/m2
Up for M2 at Ory Corp.
good first issue
A good issue to tackle when being a novice to the project.
help wanted
We are looking for help on this one.
Milestone
Describe the bug
The field type appears to change for the 'traits.email' field after the initial attempt to register an account is unsuccessful. The field starts of with a type of 'email' and then changes to having a type of 'text'. In my application I'm using the type value to make decisions about how to render input fields. The 'kratos-selfservice-ui-node' application appears to be not affected by this as it switches on the field name for making rendering decisions.
Reproducing the bug
Using the same default schema as the kratos-selfservice-ui-node, the first time you start the registration flow and make a call to fetch the request context the form field descriptions for the password method come back as follows (note the type for 'traits.email' is 'email'):
If the user submits a request and is unsuccessful (due to using a common password as an example) and is redirected back to the registration form, the second request to fetch the request context then looks like the following (note the type for 'traits.email' is now 'text'):
Expected behavior
I think it is reasonable to expect the 'type' of a field to remain consistent across calls to retrieve a request context with the same request id.
Environment
Additional context
N/A
The text was updated successfully, but these errors were encountered: