AshAuthentication.Phoenix.Components.RecoveryCode.VerifyForm (ash_authentication_phoenix v3.0.0-rc.6)

View Source

Generates a verification form for recovery code authentication.

This component supports two authentication flows:

Token-based Flow (mode: :token)

Used after primary authentication (e.g., password sign-in) as a 2FA fallback when the user cannot access their TOTP authenticator. The token contains partial authentication info that will be exchanged for a full session token after successful recovery code verification.

Step-up Authentication Flow (mode: :step_up)

Used when an already-authenticated user needs to verify their identity to access protected resources. No token is required.

Component hierarchy

This is rendered by AshAuthentication.Phoenix.RecoveryCodeVerifyLive.

Children:

Overrides

This component provides the following overrides:

  • :root_class - CSS class for the root div element.
  • :slot_class - CSS class for the div surrounding the slot.
  • :form_class - CSS class for the form element.
  • :button_text - Text for the submit button.
  • :disable_button_text - Text for the submit button when the request is happening.
  • :label_class - CSS class for the h2 element.
  • :label_text - Text for the form heading.
  • :instructions_class - CSS class for instructions text.
  • :instructions_text - Instructions text shown above the code input.
  • :error_class - CSS class for error messages.
  • :sign_in_link_class - CSS class for the sign-in link when not authenticated.
  • :sign_in_link_text - Text for the sign-in link.
  • :totp_link_class - CSS class for the TOTP verify link.
  • :totp_link_text - Text for the link to TOTP verification (or nil to hide).
  • :totp_link_path - Path to the TOTP verification page (or nil to hide the link).

See AshAuthentication.Phoenix.Overrides for more information.