Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Prefill the recovery email from the login identifier on "Forgot password?"

オープン
#606 コメント 0 件 リアクション 1 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
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 の本文から書いたものです。

説明

enhancement
Preflight checklist
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
  1. LabelAction adds login_hint=<identifier> to the "Forgot password?" link. On the password step the identifier is in the hidden identifier node.
  2. The login_hint prefill in form-helpers.ts also covers recovery flows. Today prefillIdentifierFields only lists identifier and traits.email. Recovery uses email, or recovery_address when 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.Label to add login_hint to the link. This means taking over label rendering for the whole form.
  • On the recovery page, read login_hint from flow.request_url and set the email / recovery_address node 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 はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

ory/elements のほかの issue

ory/elements の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。