Skip to content

Commit

Permalink
Add note on 2FA for qr_login
Browse files Browse the repository at this point in the history
  • Loading branch information
Lonami committed Sep 21, 2022
1 parent c975b56 commit 346a3f0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions telethon/client/auth.py
Expand Up @@ -586,6 +586,9 @@ def display_url_as_qr(url):
# 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()
Expand Down

0 comments on commit 346a3f0

Please sign in to comment.