AshAuthentication.Phoenix.Components.Otp.VerifyForm
(ash_authentication_phoenix v3.0.0-rc.6)
View Source
Generates the form for verifying an OTP code (step two of the OTP flow).
The form posts directly to the strategy's sign-in endpoint via
phx-trigger-action so the JWT lands in the session through the standard
AuthController pipeline.
Component hierarchy
This is a child of AshAuthentication.Phoenix.Components.Otp.
Children:
AshAuthentication.Phoenix.Components.Otp.Input.code_field/1AshAuthentication.Phoenix.Components.Otp.Input.submit/1
Props
strategy- The OTP strategy configuration. Required.identity- The identity value (e.g. email address) submitted in the request phase. Pre-filled into a hidden field on the verify form. Required.parent_id- The ID of the parentComponents.OtpLiveComponent. Required.auth_routes_prefix- Optional prefix for authentication routes.label- Text to show in theh2heading.falseto disable.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 rootdivelement.:form_class- CSS class for theformelement.:disable_button_text- Text for the submit button when the request is happening.:label_class- CSS class for theh2element.:description_class- CSS class for the description paragraph.:description_text- Text shown above the OTP code field, e.g. "Enter the code we sent you.". Set tonilto disable.:back_link_class- CSS class for the back link.:back_link_text- Text for the link that returns to the request form. Set tonilto disable.
See AshAuthentication.Phoenix.Overrides for more information.
Summary
Types
@type props() :: %{ :strategy => AshAuthentication.Strategy.t(), :identity => String.t(), :parent_id => String.t(), optional(:auth_routes_prefix) => String.t(), optional(:label) => String.t() | false, optional(:current_tenant) => String.t(), optional(:context) => map(), optional(:overrides) => [module()], optional(:gettext_fn) => {module(), atom()} }