bitlbee / bitlbee-facebook

Facebook protocol plugin for BitlBee
GNU General Public License v2.0
279 stars 49 forks source link

Support Login Approvals #80

Open coxley opened 8 years ago

coxley commented 8 years ago

Facebook has support for 2FA in the way of "Login Approvals". This bitlbee plugin should support this:

facebook - Logging in: Authenticating                                                                    
facebook - Login error: Login approvals are on. Expect an SMS shortly with a code to use for log in (406)
facebook - Logging in: Signing off..                                                                     
andreimarcu commented 8 years ago

It "supports" it

account facebook set password 123456
account facebook on
coxley commented 8 years ago

That would override the regular account password yeah?

dequis commented 8 years ago

Yeah, alternatively you can just use app passwords

dgw commented 5 years ago

As a note, setting the regular password, attempting login, then attempting again after changing the password in BitlBee to the SMS code appears not to work any more. Facebook sends an "Invalid username or password (401)" error now.

An app password appears to be the only way to log in if one has 2FA enabled, now.

dithpri commented 4 years ago

Workaround: disable 2FA, login with bitlbee, reenable 2FA

blacklight commented 2 years ago

Just a heads up - the app password section has apparently disappeared from the settings. Is there any other way to get a FB app key?

dequis commented 2 years ago

Yeah, workaround: auth with this python script and account facebook set token <the access token you got from there>

usvi commented 2 years ago

Hello. I think I solved this.

Patch: https://github.com/usvi/bitlbee-facebook/commit/31b56ec07d8b1682a15e1dde114810140dddcb4e

How it works: https://github.com/usvi/bitlbee-facebook/issues/1#issuecomment-1186268820

@dequis : Do you happen to have any info about how to proceed? Or someone else?

Edit: (Indentation was a bit wrong, fixed it in the next commit. I better start using M-x whitespace-mode by default in my emacs.)

Edit2: Put the thing in new branch for easy merging.