Closed dathbe closed 10 months ago
From my understanding, you need to specify a custom folder for the cookies if you want them to persist as the default is a temporary directory which is purged by the OS after restart, e.g. api = PyiCloudService("name@icloud.com", "password", "~/cookies/go/here")
I was traveling when this solution was posted, so I didn't see it until just now. But I believe it does do the trick. Thanks very much.
The problem
The first time I run my script, it requires 2fa (as expected).
Every subsequent time I run my script without restarting, it does not require additional 2fa (as expected). But when I restart the device, the script requires a new 2fa (not as expected). Once the device has been validated with 2fa, is there a way to save the validation so that it can be reused after restart?
Environment
pip show pyicloud
): 1.0.0python -V
): 3.9.2Traceback/Error logs
Checklist
Additional information
I don't think this is a bug. It's just a question about how the software works. If it is not possible to persist a 2fa authentication beyond a restart, that's fine, but if there is a way to store a cookie or credentials or something to pass to the script, I'd like to do so.