View Source WebauthnComponents.SupportComponent (WebauthnComponents v0.8.0)

A LiveComponent for detecting WebAuthn support.

This component should be used in combination with RegistrationComponent and AuthenticationComponent to disable their buttons when WebAuthn is not supported or enabled.

An application may also use SupportComponent to steer users away from traditional authentication to the more secure Passkey authentication method. For example, an application that supports both traditional authentication and Passkeys may redirect users to a Passkey LiveView or render a message encouraging the new authentication method.

Assigns

  • @id (Optional) An HTML element ID.
  • @passkeys_supported: (Internal) A boolean indicating the client does or does not support the WebAuthn API.

Events

  • "passkeys-supported": Sent by the client when Passkey support has been checked.

Messages

  • {:passkeys_supported, boolean}
    • boolean will be true when WebAuthn is supported and enabled, and false when it is not supported or enabled.

Summary

Functions

Link to this function

handle_event(event, payload, socket)

View Source

Callback implementation for Phoenix.LiveComponent.handle_event/3.

Callback implementation for Phoenix.LiveComponent.mount/1.

Callback implementation for Phoenix.LiveComponent.render/1.