Skip to content

TypeScript API / contentia/server/oauth2 / OAuthTotpOptions

Interface: OAuthTotpOptions ​

TOTP options accepted by OAuthConfig.totp: OAuthTotpConfig with an optional issuer. The OAuth handlers fill in the default before calling the functions in this module, which all take a complete OAuthTotpConfig.

Extends ​

Properties ​

callbacks ​

ts
callbacks: OAuthTotpCallbacks;

Callbacks for TOTP operations

Inherited from ​

OAuthTotpConfig.callbacks


enabled ​

ts
enabled: boolean;

Enable TOTP 2FA

Inherited from ​

OAuthTotpConfig.enabled


issuer? ​

ts
issuer?: string;

Issuer name (displayed in authenticator app). Defaults to DEFAULT_TOTP_ISSUER ('Contentia'). It is baked into every enrolled otpauth:// URI, so changing it later breaks existing enrollments.


required? ​

ts
required?: boolean;

Require users to set up TOTP (forces enrollment if not configured)

Inherited from ​

OAuthTotpConfig.required


window? ​

ts
window?: number;

Number of time steps to allow for clock drift (default: 1)

Inherited from ​

OAuthTotpConfig.window