mfa-totp

Implement TOTP-based MFA with policy activation and encrypted secret storage.

Updated May 13, 2026
One-click install
npx skills add https://github.com/dloschiavo/orca --skill mfa-totp
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mfa-totp
Source: https://github.com/dloschiavo/orca/tree/main/recipe/mfa-totp
Command: npx skills add https://github.com/dloschiavo/orca --skill mfa-totp

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires otp-auth, multi-tenant, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill addresses the need for multi-factor authentication (MFA) using Time-based One-Time Passwords (TOTP) to enhance security in multi-tenant applications.

Core Features & Use Cases

  • Policy Decision Function: Determines whether MFA is required for a user based on organizational settings.
  • Four-State Login State Machine: Handles pending, MFA enrollment, MFA challenge, and active states.
  • MFA Required Toggle: Enables or disables MFA at the organizational level.
  • Encrypted Secret Storage: Stores user secrets securely using AES-256-GCM encryption.
  • Recovery Codes: Provides single-use recovery codes for account recovery.
  • Admin Recovery Setup: Offers self-service, peer reset, support reset, and superadmin break-glass recovery options.
  • Trusted Device Piggyback: Utilizes the existing session cookie for trusted device functionality.
  • Enrollment UX: Facilitates user enrollment and recovery code generation.

Quick Start

Use the mfa-totp skill to enroll in multi-factor authentication on your account.

Frequently Asked Questions about mfa-totp

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement TOTP multi-factor authentication in a multi-tenant application?

You can implement TOTP MFA using a four-state login state machine that handles pending, enrollment, challenge, and active states, while enforcing policy-based MFA activation across organizational tenants.

How does MFA recovery work when users lose access to their TOTP device?

MFA recovery provides single-use recovery codes generated during enrollment, alongside admin recovery options including self-service, peer reset, support reset, and superadmin break-glass procedures.

How should I store TOTP secrets securely for multi-factor authentication?

TOTP secrets should be stored using AES-256-GCM encrypted secret storage to ensure cryptographic protection of user authentication keys at rest within the database.

Can I enforce multi-factor authentication selectively based on organization settings in a multi-tenant app?

Yes, a policy decision function evaluates organizational settings via an MFA required toggle to determine whether TOTP multi-factor authentication is mandatory for specific users or tenants.

What dependencies do I need to set up time-based one-time password authentication?

Setting up this TOTP authentication requires the otp-auth library for token generation and validation, and the multi-tenant dependency for managing organizational policy isolation.

How do I manage trusted devices during multi-factor authentication login?

Trusted device functionality piggybacks on the existing session cookie, allowing users to bypass repeated MFA challenges on recognized devices without additional infrastructure.