Ory elements registration form sets all fields as required
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 38/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- next.js, react, typescript
調査の方向性
Registration コンポーネントから始め、ui.nodes 属性が必須フォームフィールドに変換される仕組みを、email のみが必須で traits.phone が任意である例を使って確認します。登録 UI で電話番号なしでも送信でき、なおかつ email は必須のままであることを確認します。
索引モデルが issue の本文から書いたものです。
説明
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
- 主要言語
- TypeScript
- スター
- 187
- フォーク
- 80
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
ory/elements のほかの issue
-
Needs Triage
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
good first issue help wanted upstream
難易度 2/5 1〜3時間 初心者へのやさしさ 45/100
-
good first issue help wanted upstream
難易度 3/5 1〜2日 初心者へのやさしさ 25/100
-
Needs Triage
難易度 3/5 1〜2日 初心者へのやさしさ 52/100
-
bug
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
似ている issue
-
documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
inu-appcenter/memorIN-frontend#106 ·
メンテナーはふだん 1 日以内に返信
-
kind/bug
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
メンテナーはふだん 7 日以内に返信
-
[Bug] @deck.gl/arcgis dist import resolves to unpublished @deck.gl/core source path (9.3.11, 9.4.0)オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
CSCfi/sd-search-ui#145 ·
メンテナーはふだん 1 日以内に返信
-
Add: Cbeebies pl SDオープンcheck:passed streams:add
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信