AshAuthentication.Phoenix.WebAuthnVerifyLive
(ash_authentication_phoenix v3.0.0-rc.6)
View Source
A generic, white-label WebAuthn second-factor verification page.
Two flows are supported:
Token flow (primary → second factor)
Used right after a primary sign-in (e.g. password) when the user has a
passkey registered. The :token URL parameter is the short-lived JWT issued
by the primary strategy; this page performs the WebAuthn ceremony and
exchanges the verified token for a session.
Step-up flow
Used by an already-signed-in user re-asserting their second factor for a
sensitive operation. No token is required — the page reads the
current_user from the session.
Usage
scope "/", MyAppWeb do
pipe_through :browser
webauthn_2fa_route MyApp.Accounts.User, :webauthn, auth_routes_prefix: "/auth"
endOverrides
This component provides the following overrides:
:root_class- CSS class for the rootdivelement.:webauthn_verify_id- Element ID for theWebAuthnVerifyLiveComponent.
See AshAuthentication.Phoenix.Overrides for more information.