Skip to main content
Prerequisite: A Base32 TOTP secret (shown during 2FA enrollment) or an otpauth:// URI (often embedded in a QR code).
The otpauth library is preloaded in the JavaScript step sandbox.

From a Base32 secret

From an otpauth:// URI

Then add a Type step with value {{ env.TOTP_CODE }}.
Store the secret as an environment variable rather than hardcoding it.