dchristl / macless-haystack

Create your own AirTag with OpenHaystack, but without the need to own an Apple device
GNU General Public License v3.0
414 stars 66 forks source link

2FA not working #46

Closed maximushugus closed 5 months ago

maximushugus commented 9 months ago

I have an apple account with 2FA enabled made for this project. I was already using openhaystack on a MacOS VM. I was able to set up the docker containers. But after lanching the docker with docker run -it --restart unless-stopped --name macless-haystack -p 6176:6176 --volume mh_data:/app/endpoint/data --network mh-network christld/macless-haystack and login with my appleID and password, it keeps asking for 2FA. I don't receive SMS when it asks for 2FA so I launched my MacOS VM and on settings I clicked on "verification code", so I get a 6 digit code. But putting this one doesn't do the trick and it keeps asking for 2FA.

I tried connecting to icloud.com, and requesting my 2FA via SMS, and not putting this code in my browser for icloud.com but instead putting when macless-haystack asks but the same problem, it keep asking for 2FA.

Does someone know why ?

mg8x commented 7 months ago

just now tried the bimester's it was same i didnt get any sms. i will try later with another apple id. thank you for your hard work

dchristl commented 7 months ago

just now tried the bimester's it was same i didnt get any sms. i will try later with another apple id. thank you for your hard work

You should try with trusteddevice, if you have a real Apple device.

mg8x commented 7 months ago

i will try it later. it would be great if it works on my VPS bcz i'm planning to develop a telegram bot for the reports(its too easy. and i would like to contribute to this project for the bot if you wish) and i think its better for getting notified.

ramenaru commented 7 months ago

im becoming elektronomia sky high, my 2FA setting isn't work lmao.

poseiso commented 7 months ago

I am currently facing the same issue, should i show log as well?

dchristl commented 7 months ago

I am currently facing the same issue, should i show log as well?

Only if you don't get the message: :2FA unsuccessful. Maybe wrong code or wrong number. Check your account details.

ramenaru commented 7 months ago

i after success 2FA with sms, but my apple id is blocked why ?

log:

2024-04-30 10:01:46,307 - INFO - 2FA successful 2024-04-30 10:01:46,333 - INFO - Authentication request initialization 2024-04-30 10:01:48,259 - DEBUG - HTTP-Code: 200

[2024-04-30 10:01:51,966 - DEBUG - Answer from icloud login 2024-04-30 10:01:51,966 - DEBUG - {'dsid': '21623485671', 'delegates': {'com.apple.mobileme': {'status': 1, 'status-message': 'A server problem is blocking Apple ID sign in.]

dschense commented 6 months ago

@Ramenaru do you try to login with enabled VPN? Apple Login sometimes hates any type of VPN. If you are using, disable, login and enable again after login.

ramenaru commented 6 months ago

@Ramenaru do you try to login with enabled VPN? Apple Login sometimes hates any type of VPN. If you are using, disable, login and enable again after login.

no I didn't use any VPN, or kinda like that. that's just say try adding a credit card, but my apple account is already have some credit card. Im from southeast Asia is that any related problem to my region ? or any suggest ? please help

thirstyone commented 5 months ago

yet another person who doesn't receieve an sms from apple (phone number registered (android phone, if that mattters), 2FA enabled, no vpn is used.. tried ... christld/macless-haystack:latest-dev - no luck ;-(

maplepy commented 5 months ago

No 2FA code is received here either

dchristl commented 5 months ago

If all the tips in the FAQ don't help, then only Apple knows why the accounts aren't working. Sorry, there's nothing I can do here, so I'm closing the issue.

zerog2k commented 2 months ago

The other thing you could possibly do is, if you have a real mac logged into the account, use the anisette headers from the mac to bypass 2FA.

Can someone explain how to do this if we are able to login with 2FA to https://appleid.apple.com/account/manage, but not with macless-openhaystack ?

Xopher00 commented 2 months ago

I am having the exact same issue and am very frustrated this has not been resolved. I also have sms set up for 2fa. This still has not been resolved? I was doing my own research and everything I found pointed to here as the easiest way to set things up. Excerpt from docker logs:

`remote: Enumerating objects: 6, done.
remote: Counting objects: 100% (6/6), done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 6 (delta 0), reused 5 (delta 0), pack-reused 0 (from 0)
Unpacking objects: 100% (6/6), 4.43 KiB | 1.11 MiB/s, done.
From https://github.com/dchristl/macless-haystack
 * branch            main       -> FETCH_HEAD
   92d56a0..7fcbea6  main       -> origin/main
2024-09-26 16:53:46,576 - DEBUG - Searching for token at /app/endpoint/data/auth.json
2024-09-26 16:53:46,577 - INFO - No auth-token found.
2024-09-26 16:53:46,577 - INFO - Trying to register new device.
2024-09-26 16:53:46,578 - INFO - Trying to login
Apple ID: pricekr
Password:
2024-09-26 16:53:55,764 - INFO - Authentication request initialization
2024-09-26 16:53:56,545 - DEBUG - HTTP-Code: 200
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Response</key>
    <dict>
        <key>Status</key>
        <dict>
            <key>hsc</key>
            <integer>200</integer>
            <key>ed</key>
            <string></string>
            <key>ec</key>
            <integer>0</integer>
            <key>em</key>
            <string></string>
            <key>tt</key>
            <string></string>
            <key>rsh</key>
            <false/>
        </dict>
        <key>i</key>
        <integer>818</integer>
        <key>s</key>
        <data>5DqZSkLZYQtbiWIDgyV6IQ==</data>
        <key>sp</key>
        <string>s2k_fo</string>
        <key>ptxid</key>
        <string>77315882-3856-4714-ab69-139863107f46</string>
        <key>c</key>
        <string>d-53e-eb437572-7c27-11ef-8f3e-b7525ea82019:RNO</string>
        <key>B</key>
        <data>T1HkpuKbqMnXSy/6dCWtqPLehZxT9LTU/BymhfpIqQIJ8JRYysZEa/jumw7EdXgYHkOHef/Kt/inTDPb/1HpPQa6ufVLHTK8KKkImEjZYmKBRp4qaFxVNWPEnFhXxhLkxX97PCwWVcZe9Irx61w2yTI5IsP6GWgr5t7GeSE+f+8akmTpz75osDXhciFHyRH7emoJfXKPDmDRs4qimHx4K1nNFETJGwcCgknTnt1FWl07aIMV5VAD5Bq8tDd50hBRpknRGFwwcOYxsKcEICIk2FvZw+Z0R3+pLkQecwKCBs+aG1XTq36KQP3QmWeMhiol2WWk956B9w/dOj6Z0XCnqA==</data>
    </dict>
    <key>Header</key>
    <dict>
    </dict>
</dict>
</plist>

2024-09-26 16:53:56,548 - WARNING - This implementation only supports s2k. Server returned s2k_fo
Traceback (most recent call last):
  File "/app/endpoint/mh_endpoint.py", line 159, in <module>
    apple_cryptography.registerDevice()
  File "/app/endpoint/register/apple_cryptography.py", line 77, in registerDevice
    getAuth(regenerate=True)
  File "/app/endpoint/register/apple_cryptography.py", line 50, in getAuth
    mobileme = icloud_login_mobileme(
               ^^^^^^^^^^^^^^^^^^^^^^
  File "/app/endpoint/register/pypush_gsa_icloud.py", line 41, in icloud_login_mobileme
    pet = g["t"]["com.apple.gs.idms.pet"]["token"]
          ~^^^^^
TypeError: 'NoneType' object is not subscriptable
From https://github.com/dchristl/macless-haystack
 * branch            main       -> FETCH_HEAD
2024-09-26 16:54:00,466 - DEBUG - Searching for token at /app/endpoint/data/auth.json
2024-09-26 16:54:00,467 - INFO - No auth-token found.
2024-09-26 16:54:00,467 - INFO - Trying to register new device.
2024-09-26 16:54:00,467 - INFO - Trying to login`