Skip to main content

2FA

Two-Factor Authentication (2FA) package for generating and validating time-based one-time passwords (TOTP) in your automation workflows.

Overview

The 2FA package enables you to work with two-factor authentication systems programmatically. Use it when your automation needs to log into services protected by 2FA, or when you need to generate OTP codes for testing and verification purposes.

Key Features

  • Generate OTP Codes - Create time-based one-time passwords from secret keys
  • Generate QR Codes - Create QR code images for 2FA setup that can be scanned by authenticator apps
  • Decode QR Codes - Extract secret keys from existing 2FA QR code images

When to Use This Package

  • Automated Login: When your bot needs to log into services with 2FA enabled (e.g., banking portals, admin panels)
  • Testing 2FA Flows: When testing applications that implement two-factor authentication
  • Account Setup Automation: When automating the setup of 2FA for multiple accounts
  • Secret Key Recovery: When you need to extract secrets from QR code images for backup purposes

Available Nodes

  • Generate OTP - Generates a TOTP code from a secret key (compatible with Google Authenticator, Authy, etc.)
  • Generate QR - Creates a QR code image containing 2FA setup information
  • Decode QR - Reads a QR code image and extracts the encoded secret key

Typical Workflow

  1. Store your 2FA secret key securely in Vault
  2. When logging into a protected service, use Generate OTP to create the current code
  3. Enter the generated code into the login form using Browser or Web Automation nodes