EzAuth.UI.TaskForgotPassword (EzAuth v0.1.0)

Copy Markdown View Source

Password-recovery orchestrator as a LiveComponent.

Walks the user through three named steps that mirror the strategy lifecycle:

  • default (no :step) - email entry; submit triggers the request action
  • :request - request action completed; neutral "check your inbox" + "I've received a code" affordance
  • :verify - delegates to TaskVerifyAccount for code entry
  • :reset - delegates to TaskResetPassword for the new password

On successful reset, the user is redirected to Config.sign_in_path() so they re-authenticate with their new password (no auto-sign-in).

Pass the typed email (if any) so the email-entry form prefills it.

Children (TaskVerifyAccount, TaskResetPassword) are rendered without an on_back so their "Back" button is hidden — once the user is in the recovery flow, stepping back doesn't carry useful state to recover.

Usage

<.live_component
  module={EzAuth.UI.TaskForgotPassword}
  id="forgot-password"
  email={@identity}
/>