iCloud-API icon indicating copy to clipboard operation
iCloud-API copied to clipboard

const trusting = await this.trust(self) FAIL?

Open KjellConnelly opened this issue 4 years ago • 0 comments

Hi! I have fixed a couple things in the source code locally to get things working a bit better, but I am stuck here..

It prompts me for my 2 factor authentication, and I type in the 6 digit number. But then it says I'm logged in, but I'm not. I'm using your standard workflow.

In setup.js there's some code...

        const trusting = await this.trust(self);

        // Use /trust's headers (X-Apple-Twosv-Trust-Token and new authentication token)
        if ("x-apple-session-token" in trusting.response.headers) {
          self.auth.token = trusting.response.headers["x-apple-session-token"];
        }
        if ("x-apple-twosv-trust-token" in trusting.response.headers) {
          self.auth.xAppleTwosvTrustToken = trusting.response.headers["x-apple-twosv-trust-token"];
        }

Well, trusting.response.headers does not have those keys. Anyone else have these problems?

KjellConnelly avatar Aug 17 '21 23:08 KjellConnelly