foxt / icloud.js

Library for accessing iCloud in Node.js

Home Page:https://npmjs.com/icloudjs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Offer MFA Code Resend / Send via SMS function

theDevelopper opened this issue · comments

It would be helpful to offer functions that allow to resend the MFA code or send it via different means like the iCloud login does.

I see at least two functions, but there might be more:

  1. Resend Code in case it was not received

  2. Send code via SMS
    On the iCloud login page this triggers a PUT request to https://idmsa.apple.com/appleauth/auth/verify/phone with body

{
    "mode": "sms",
    "phoneNumber": { 
        "id": 1
    }
}

I would trigger the call myself but it requires a bunch of headers that should be available in the iCloud instance this library creates.