foxt / icloud.js

Library for accessing iCloud in Node.js
https://npmjs.com/icloudjs
MIT License
46 stars 4 forks source link

Prevent e-mails 'Your Apple ID is being used to sign in on the web' #25

Open WeeJeWel opened 2 weeks ago

WeeJeWel commented 2 weeks ago

Can these e-mails be prevented? Maybe by persisting the cookies on the filesystem?

foxt commented 2 weeks ago

Apple sends these notifications every time a new sign-in session is created. The library does store the trust tokens to the disk (to prevent entering OTP every time), but storing actual session cookies (probably by serialising the entire authStore instead of just the trust token) is something I haven't looked into, as it may complicate session expiry & renewal some more.

WeeJeWel commented 2 weeks ago

Does the library currently handle expiry automatically? If so, it should not be a big change.