diff --git a/fbchat/client.py b/fbchat/client.py index 37c5138..1dbbe4c 100644 --- a/fbchat/client.py +++ b/fbchat/client.py @@ -230,11 +230,12 @@ class Client(object): r = self._cleanPost(LoginURL, data) - + # Usually, 'Checkpoint' will refer to 2FA if 'checkpoint' in r.url: r = self._2FA(r) - if 'save-device' in r.url: + # Sometimes Facebook tries to show the user a "Save Device" dialog + if 'save-device' in r.url and 'Enter Security Code to Continue' in r.text: r = self._cleanGet(SaveDeviceURL) if 'home' in r.url: