The magic behind 2FA apps explained

The magic behind 2FA apps explained

Ever wondered how those codes in authenticator apps work? In this video, we break down the magic behind 2FA apps and explain how they keep your accounts secure. Learn how passwords evolve into one-time codes, how hash functions and HMACs play a role, and how time-based one-time passwords (TOTP) generate those six-digit codes that change every 30 seconds. Plus, discover how QR codes make setup a breeze! Whether you’re a tech enthusiast or just curious, this deep dive into the world of two-factor authentication will leave you amazed.

HOTP: An HMAC-Based One-Time Password Algorithm
https://www.ietf.org/rfc/rfc4226.txt

TOTP: Time-Based One-Time Password Algorithm
https://www.ietf.org/rfc/rfc6238.txt

Animations made by manim:
The Manim Community Developers. (2025). Manim – Mathematical Animation Framework (Version v0.19.0) [Computer software]. https://www.manim.community/

Chapters:
00:00 – Intro
00:10 – What’s wrong with static passwords?
01:15 – Hash function
02:00 – HMAC
02:50 – Time based One Time Password
03:45 – QR codes?