<!-- review: finished -->

<a id="external-auth-totp"></a>

# Auth TOTP

The module implements the time-based one-time password (TOTP) algorithm
and provides short-lived one-time passwords.

Features:

- Standard HTTP authentication using TOTP.
- Tracking authenticated clients via cookies after TOTP expiration.
- Configurable secret, time seed, time step, and truncation length for TOTP generation.
- Configurable time window for TOTP verification.

<a id="installation-106"></a>

## Installation

To [install](https://en.angie.software//angie/docs/installation/index.md#install-packages) the module, use one of the following packages:

- Angie: `angie-module-auth-totp`
- Angie PRO: `angie-pro-module-auth-totp`

<a id="loading-the-module-106"></a>

## Loading the module

To use the module, load it in the `main{}` context:

```nginx
load_module modules/ngx_http_auth_totp_module.so;
```

<a id="configuration-example-106"></a>

## Configuration example

```nginx
server {
    listen 80;

    location /protected {
        auth_totp_realm "Protected";
        auth_totp_file /etc/angie/totp.conf;
        auth_totp_length 8;
        auth_totp_reuse off;
        auth_totp_skew 1;
        auth_totp_step 1m;
        auth_totp_cookie "totp-session";
        auth_totp_expiry 1d;
    }
}
```

<a id="additional-information-106"></a>

## Additional information

Detailed documentation and source code are available at:
[https://github.com/61131/nginx-http-auth-totp](https://github.com/61131/nginx-http-auth-totp)
