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

View Source

Drives the WebAuthn second-factor ceremony.

Two modes:

  • :token — primary sign-in just completed; @token is the short-lived JWT issued by the primary strategy. After a successful WebAuthn assertion the token is exchanged at the strategy's sign_in_with_token endpoint for a session that carries the :webauthn_verified_at metadata.
  • :step_up — already-authenticated user re-asserting. No token; the component issues its own short-lived token after the ceremony so the same exchange can produce a refreshed session.

Reuses the existing WebAuthnAuthenticationHook JS hook because the challenge / assertion shape is identical to a primary-mode sign-in ceremony — the only difference is server-side scoping to the actor's credentials.

Overrides

This component provides the following overrides:

  • :root_class - CSS class for the root div element.
  • :form_class - CSS class for the visible form wrapping the verify button.
  • :label_class - CSS class for the heading.
  • :submit_class - CSS class for the submit button.
  • :label_text - Heading text.
  • :instructions_class - CSS class for the instructions paragraph.
  • :instructions_text - Instructions shown above the verify button.
  • :submit_text - Text shown on the verify button.
  • :submit_disabled_text - Text shown on the verify button while the ceremony is in flight.
  • :error_class - CSS class for error messages.
  • :error_unauthenticated_text - Text shown when the user is neither authenticated nor presenting a valid token.
  • :sign_in_link_class - CSS class for the sign-in fallback link.
  • :sign_in_link_path - Path of the sign-in page.
  • :sign_in_link_text - Text for the sign-in fallback link.

See AshAuthentication.Phoenix.Overrides for more information.