Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta
#606 0 commenti 1 reazione 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
72/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
react, typescript

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
TypeScript
Stelle
187
Fork
79
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di ory/elements

Tutte le issue di ory/elements

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.