JJTech0130 / pypush

[being rewritten] Cross-platform iMessage POC
https://discord.gg/BVvNukmfTC
Other
3.52k stars 397 forks source link

Apple 2FA not supported? #77

Closed Cr4z33 closed 7 months ago

Cr4z33 commented 7 months ago

I've got 2FA enabled for my Apple account and when pypush asks for it I get this after entering the (2FA) code:

Traceback (most recent call last):
  File "/pypush/./demo.py", line 341, in <module>
    trio.run(main, args)
  File "/usr/local/lib/python3.11/dist-packages/trio/_core/_run.py", line 2251, in run
    raise runner.main_task_outcome.error
  File "/pypush/./demo.py", line 244, in main
    users.append(ids.IDSAppleUser.authenticate(conn, username, password))
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/pypush/ids/__init__.py", line 65, in authenticate
    user_id, auth_token = profile.get_auth_token(username, password, factor_callback)
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/pypush/ids/profile.py", line 64, in get_auth_token
    raise Exception(f"Error: {result}")
Exception: Error: {'message': 'SED:3:VEN-PROD:43aa8e34-ba49-40f5-80f5-e414fe93fb55:432f9f65-bbb9-4aae-b54f-86f2f179292c:1702051751:b67a06b0-7d01-4172-84e2-42c1297a2df0:9a29965493c79209a82f585c6d278c60e87216be5b90dc433a78673066c314aa:EM', 'status': 5012}

By the way I am using the sms-forwarding branch under Debian.

Kasherpete commented 7 months ago

Error 5012 signals a bad username or password, or InvalidNameOrPassword to be specific.

Cr4z33 commented 7 months ago

I am 100% sure that I've entered my login details correctly. 😉

Cr4z33 commented 7 months ago

Forgot to mention that I try getting the 2FA code by going to appleid.apple.com and asking to send me the code by SMS (I have no Apple devices).

Then of course I don't go on on logging in that page and enter the code in the terminal instead.

Correct or wrong method?

Kasherpete commented 7 months ago

Just to confirm that this is a numeric 6 digit code without spaces or dashes?

Cr4z33 commented 7 months ago

Yep correct and I've already used this method succesfully many times for logging into Apple TV+.

By the way it's strange that with Beeper Mini it doesn't ask for the 2FA code when connecting the Apple ID.

Kasherpete commented 7 months ago

This is weird, try switching it to a phone call rather than SMS.

Cr4z33 commented 7 months ago

@Kasherpete what if I opt not to login into Apple?

Will pypush not work then? 🤔

Cr4z33 commented 7 months ago

Also maybe it's just a coincidence, but having Apple blocked beeper from accessing iMessage they might have ALSO blocked other third-party solutions like pypush?

SpaceSaver commented 7 months ago

When they blocked Beeper, it also blocked Pypush. Currently Pypush is inoperable.

Cr4z33 commented 7 months ago

@SpaceSaver as I suspected... OK thanks... 🙁