# mod\_auth2fa

Source: https://zotonic.com/docs/1293/mod_auth2fa

URI: https://zotonic.com/id/1293

Language: en



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`.

License: 

Attribution: 

Related resources: https://zotonic.com/api/agent/related/1293?language=en


## API access

- [API help](<https://zotonic.com/api-help>)
- [OpenAPI specification](<https://zotonic.com/openapi.json>)
- [This resource as JSON](<https://zotonic.com/api/agent/resource/1293?language=en>)
