Prefill the recovery email from the login identifier on "Forgot password?"
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 72/100
- issue の種類
- 機能追加
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- react, typescript
調査の方向性
Start with packages/elements-react/src/theme/default/components/form/label.tsx and packages/elements-react/src/components/form/form-helpers.ts, as linked in the issue. Trace how the hidden identifier node is used on the password step and how recovery fields are prefilled; check that only email identifiers are passed as login_hint. Done when recovery prefills the appropriate email field, including recovery_address when enabled, without passing usernames or phone numbers.
索引モデルが 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 your problem
In the two-step login form, the user enters their email, clicks continue, and lands on the password step. If they then click "Forgot password?", Elements opens a new recovery flow without the email, so the user has to type it again.
Requested by an Ory Network customer.
Describe your ideal solution
LabelActionaddslogin_hint=<identifier>to the "Forgot password?" link. On the password step the identifier is in the hiddenidentifiernode.- The
login_hintprefill inform-helpers.tsalso covers recovery flows. TodayprefillIdentifierFieldsonly listsidentifierandtraits.email. Recovery usesemail, orrecovery_addresswhen the choose-recovery-address feature is on.
Only pass the hint when the identifier is an email address, since the login identifier can also be a username or phone number.
Workarounds or alternatives
Users can build this today:
- Override
components.Node.Labelto addlogin_hintto the link. This means taking over label rendering for the whole form. - On the recovery page, read
login_hintfromflow.request_urland set theemail/recovery_addressnode value before passing the flow to<Recovery>.
This puts the email in the URL, so it ends up in browser history and request logs. Passing it through sessionStorage avoids that, since login and recovery are on the same origin. The built-in version could be opt-in for the same reason.
Version
@ory/elements-react 1.2.1 and 1.3.0-rc.0
Additional Context
No Kratos change is needed. Kratos keeps extra query params on the recovery init URL: /self-service/recovery/[email protected] comes back unchanged in the flow's request_url.
- 主要言語
- TypeScript
- スター
- 187
- フォーク
- 80
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
ory/elements のほかの issue
-
Needs Triage
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
Needs Triage
難易度 5/5 1週間以上 初心者へのやさしさ 22/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
似ている issue
-
`cf complete zsh >> .zshrc` fails on vanilla zsh再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
cloudflare/cf#340 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
Rename Madson cameraオープン
難易度 2/5 1時間未満 初心者へのやさしさ 75/100
StoDevX/AAO-React-Native#8785 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 75/100
-
bnv-manager-v2: accept_invite creates the Mailcow domain admin before the commit対応中かも @myOmikron が今日担当しました。 オープンbug ready-for-agent
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100