Skip to content

Open-source Python library for AI browser agents, plus Browser Use Cloud: stealth browsers and a hosted agent API.

Update 2FA secret handling in Registry class

Magnus Müllerfa5bed289174
diff --git a/browser_use/tools/registry/service.py b/browser_use/tools/registry/service.py
index 4d1a8ee60..418862c73 100644
--- a/browser_use/tools/registry/service.py
+++ b/browser_use/tools/registry/service.py
@@ -438,7 +438,7 @@ class Registry(Generic[Context]):
for placeholder in matches:
if placeholder in applicable_secrets:
# generate a totp code if secret is a 2fa secret
- if '2fa_code' in placeholder:
+ if 'bu_2fa_code' in placeholder:
totp = pyotp.TOTP(applicable_secrets[placeholder], digits=6)
replacement_value = totp.now()
else: