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

View Source

Generates and displays recovery codes for the authenticated user.

This component handles the full lifecycle of recovery code generation:

  1. Shows a "Generate new codes" button initially
  2. On click, calls the strategy's generate action directly
  3. Displays the plaintext codes in a grid
  4. Shows a confirmation button that redirects to a configurable path

Component hierarchy

This is rendered by AshAuthentication.Phoenix.RecoveryCodeDisplayLive.

Overrides

This component provides the following overrides:

  • :root_class - CSS class for the root div element.
  • :label_class - CSS class for the h2 element.
  • :label_text - Text for the heading.
  • :instructions_class - CSS class for instructions text.
  • :instructions_text - Instructions text shown above the codes.
  • :error_class - CSS class for error messages.
  • :codes_grid_class - CSS class for the grid of recovery codes.
  • :code_item_class - CSS class for individual code items.
  • :warning_class - CSS class for the warning text.
  • :warning_text - Warning text shown after generating codes.
  • :generate_button_class - CSS class for the generate button.
  • :confirm_button_class - CSS class for the confirmation button.
  • :confirm_path - Path to redirect to after confirming codes have been saved.
  • :generate_button_text - Text for the generate button.
  • :confirm_button_text - Text for the confirmation button.

See AshAuthentication.Phoenix.Overrides for more information.