How to Bypass TOTP-Based 2FA Login Flows With Playwright
Testing applications behind a login flow is cumbersome. And it gets even worse when there’s two-factor authentication (2FA) involved. Many people work around this problem by disabling it or implementing wild hacks. Automating a 2FA-based login flow is just too hard! I thought that for a long time, too. But I must admit — I was wrong.