Preflight checklist
Ory Network Project
No response
Describe the bug
When rendering the UI of a registration form, the optional fields are treated as required. In our case this is phone number — it is not a required field to register, however, users are not able to register without filling in the field.
The ui.nodes response :
{
"attributes": {
"autocomplete": "tel",
"disabled": false,
"name": "traits.phone",
"node_type": "input",
"type": "tel"
},
"group": "default",
"messages": [],
"meta": {
"label": {
"context": {
"title": "Phone Number"
},
"id": 1070002,
"text": "Phone Number",
"type": "info"
}
},
"type": "input"
}
And our identity schema only requires email as a required trait:
The resulting UI treats traits.phone filed as required:
Reproducing the bug
We run our self-hosted Next.js app with all authentication pages.
The code for the registration page is the following:
<Registration
flow={flow}
config={config}
/>
The config is like this:
export const config: OryClientConfiguration = {
intl: {
locale: 'en',
customTranslations: {
en: {
'identities.messages.1040001': 'Continue ⮕',
},
},
},
project: {
default_locale: 'en',
default_redirect_url: process.env.REDIRECT_URL ?? '/',
error_ui_url: '/error',
locale_behavior: 'force_default',
name: 'App',
registration_enabled: true,
verification_enabled: true,
recovery_enabled: true,
registration_ui_url: '/auth/registration',
verification_ui_url: '/auth/verification,
recovery_ui_url: '/auth/recovery,
login_ui_url: '/auth/login,
settings_ui_url: '/auth/settings,
},
}
Relevant log output
Relevant configuration
Version
^1.1.0
On which operating system are you observing this issue?
None
In which environment are you deploying?
None
Additional Context
No response
Preflight checklist
Ory Network Project
No response
Describe the bug
When rendering the UI of a registration form, the optional fields are treated as required. In our case this is phone number — it is not a required field to register, however, users are not able to register without filling in the field.
The
ui.nodesresponse :And our identity schema only requires
emailas a required trait:The resulting UI treats
traits.phonefiled as required:Reproducing the bug
We run our self-hosted Next.js app with all authentication pages.
The code for the registration page is the following:
The config is like this:
Relevant log output
Relevant configuration
Version
^1.1.0
On which operating system are you observing this issue?
None
In which environment are you deploying?
None
Additional Context
No response