From 346a3f0ef5652111c7bc167d4ccef5eb851c7901 Mon Sep 17 00:00:00 2001 From: Lonami Exo Date: Wed, 21 Sep 2022 12:28:51 +0200 Subject: [PATCH] Add note on 2FA for qr_login --- telethon/client/auth.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/telethon/client/auth.py b/telethon/client/auth.py index 711b6fdb..f10a3f65 100644 --- a/telethon/client/auth.py +++ b/telethon/client/auth.py @@ -586,6 +586,9 @@ class AuthMethods: # Important! You need to wait for the login to complete! await qr_login.wait() + + # If you have 2FA enabled, `wait` will raise `telethon.errors.SessionPasswordNeededError`. + # You should except that error and call `sign_in` with the password if this happens. """ qr_login = custom.QRLogin(self, ignored_ids or []) await qr_login.recreate()