mod_auth2fa

Two-factor authentication module adding TOTP setup, verification flows, and related auth checks.

Accepted Events

This module handles the following notifier callbacks:

  • observe_admin_menu: Add admin menu for external services using m_auth2fa:is_totp_enabled.
  • observe_auth_postcheck: Check the 2FA code, called after password check passed using m_auth2fa:is_totp_enabled.

Delegate callbacks:

  • event/2 with postback messages: auth2fa_remove_confirm, auth2fa_ug, dialog_2fa, request_2fa.
  • event/2 with submit messages: auth2fa_remove, auth2fa_set.

Edit on GitHub

Observes

Models

Models

auth2fa

Model for two-factor authentication state and setup, including TOTP QR/image generation, mode checks, reset checks, and clock skew checks.

Dispatch rules

Dispatch rules

mod_auth2fa dispatch rules

URL dispatch rules defined by mod_auth2fa in apps/zotonic_mod_auth2fa/priv/dispatch/dispatch.