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

View Source

Generates sign in and registration forms for WebAuthn/Passkey authentication.

Component hierarchy

This is the top-most strategy-specific component for WebAuthn, nested below AshAuthentication.Phoenix.Components.SignIn.

Children:

Props

  • strategy - The WebAuthn strategy configuration. Required.
  • overrides - A list of override modules.
  • gettext_fn - Optional text translation function.

Overrides

This component provides the following overrides:

  • :root_class - CSS class for the root div element.
  • :hide_class - CSS class to apply to hide an element.
  • :show_first - The form to show on first load. Either :sign_in or :register. Only relevant if paths aren't set for them in the router.
  • :interstitial_class - CSS class for the div element between the form and the toggle.
  • :sign_in_toggle_text - Toggle text to display when the sign in form is not showing (or nil to disable).
  • :register_toggle_text - Toggle text to display when the register form is not showing (or nil to disable).
  • :toggler_class - CSS class for the toggler a element.
  • :slot_class - CSS class for the div surrounding the slot.
  • :registration_form_module - The Phoenix component to be used for the registration form. Defaults to AshAuthentication.Phoenix.Components.WebAuthn.RegistrationForm.
  • :authentication_form_module - The Phoenix component to be used for the authentication form. Defaults to AshAuthentication.Phoenix.Components.WebAuthn.AuthenticationForm.

See AshAuthentication.Phoenix.Overrides for more information.