-
Notifications
You must be signed in to change notification settings - Fork 574
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Authentication Fix: Merge updated auth flow from pyicloud (#734)
* Merged updated auth flow from pyicloud - including 2FA. Retain Library and Domain support. * Update authentication.py to use 2FA * Fix AttributeError trying to use 'get' on Response object * Cleanup unused imports. Updated a couple incorrect references from 'apple_id' to 'accountName' * Tests: Updated 2 VCR's for better underatanding of further necessary updates. * icloudpd: Fix: No password provided or in keyring now prompts correctly icloudpd: Refactor: 2SA prompt requires device selection to send code icloudpd: Feat: New --auth-only flag to trigger log in, 2SA/2FA, and set session/cookie file. Future log in will validate the tokens without running through full signin flow. Can be used to validate the session tokens are still good without having to ping the photo endpoints. pyicloud_ipd: Clean: Removed unused imports pyicloud_ipd: Fix: Capture additional header data pyicloud_ipd: Fix: Invalid Username/Password correctly caught now pyicloud_ipd: Fix: Changes in certain error responses now captured pyicloud_ipd: Fix: Bypass 2sv/trust when using 2SA Tests: Refactored authentication tests Tests: Refactored two_step_auth tests (TODO: Add 2FA tests) Tests: Updated/Created additional VCRs for auth tests * Tests: authentication and two_step_auth tests now pass * icloudpd: Fix: Correct exception reference for API error pyicloud_ipd: Fix: Correct exception reference for API and NoStoredPassword errors Tests: Refactor: All remaining tests now pass Tests: Refactor: Update corresponding VCRs for new auth flow Tests: Cookie/Session files stored in individual test fixtures for running tests independently * icloudpd: Fix: Update exception reference icloudpd: Style: Format update (scripts/format) * fix: Update pyicloud_ipd/cmdline.py to use 2FA (in addition to 2SA) docs: Update CHANGELOG.md and README.md
- Loading branch information
1 parent
a3d351f
commit 87d3394
Showing
42 changed files
with
5,045 additions
and
2,652 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,7 +25,7 @@ There are three ways to run `icloudpd`: | |
- One time download and an option to monitor for iCloud changes continuously (`--watch-with-interval` option) | ||
- Optimizations for incremental runs (`--until-found` and `--recent` options) | ||
- Photo meta data (EXIF) updates (`--set-exif-datetime` option) | ||
- ... and many (use `--help` option to get full list) | ||
- ... and many more (use `--help` option to get full list) | ||
|
||
## Experimental Mode | ||
|
||
|
@@ -39,7 +39,15 @@ To keep your iCloud photo collection synchronized to your local system: | |
icloudpd --directory /data --username [email protected] --watch-with-interval 3600 | ||
``` | ||
|
||
Synchronization logic can be adjusted with command-line parameters. Run `icloudpd --help` to get full list. | ||
- Synchronization logic can be adjusted with command-line parameters. Run `icloudpd --help` to get full list. | ||
|
||
To independently create and authorize a session (and complete 2SA/2FA validation if needed) on your local system: | ||
|
||
``` | ||
icloudpd --username [email protected] --password my_password --auth-only | ||
``` | ||
|
||
- This feature can also be used to check and verify that the session is still authenticated. | ||
|
||
## FAQ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.