Ory elements registration form sets all fields as required
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 38/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- next.js, react, typescript
- Ambito
- authentication, frontend
Direzione di ricerca
Inizia dal componente Registration e verifica come gli attributi di ui.nodes vengono convertiti in campi obbligatori del modulo, utilizzando l'esempio in cui solo email è obbligatorio e traits.phone è facoltativo. Verifica che l'interfaccia di registrazione consenta l'invio senza un numero di telefono, continuando comunque a richiedere l'indirizzo email.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Preflight checklist
- I could not find a solution in the existing issues, docs, nor discussions.
- I agree to follow this project's Code of Conduct.
- I have read and am following this repository's Contribution Guidelines.
- I have joined the Ory Community Slack.
- I am signed up to the Ory Security Patch Newsletter.
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:
"required": [
"email"
],
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
- Lingua principale
- TypeScript
- Stelle
- 187
- Fork
- 80
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di ory/elements
-
Needs Triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
good first issue help wanted upstream
Difficoltà 2/5 1-3 ore Idoneità per principianti 45/100
-
good first issue help wanted upstream
Difficoltà 3/5 1-2 giorni Idoneità per principianti 25/100
-
Add React-only examplesApertaNeeds Triage
Difficoltà 3/5 1-2 giorni Idoneità per principianti 52/100
-
guessPotentiallyProxiedOrySdkUrl breaks flows in production behind a non-Vercel reverse proxyApertabug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
Tutte le issue di ory/elements
Issue simili
-
refactor
Difficoltà 2/5 Mezza giornata Idoneità per principianti 84/100
I maintainer di solito rispondono entro 5 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
OHDSI/Data2Evidence#3450 ·
I maintainer di solito rispondono entro 2 giorni
-
e2e-failure ready-to-code
Difficoltà 2/5 1-3 ore Idoneità per principianti 90/100
redhat-developer/rhdh-plugin-export-overlays#4011 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
automation missing-model model-sync provider:ofox
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
anomalyco/models.dev#8421 ·
I maintainer di solito rispondono entro 1 giorno
-
SlackAdapter and TelegramAdapter are not assignable to Adapter under exactOptionalPropertyTypesAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno