pyicloud icon indicating copy to clipboard operation
pyicloud copied to clipboard

Fix authentication with new authentication protocol

Open irakhlin opened this issue 1 year ago • 12 comments

…cloud-photos-downloader/icloud_photos_downloader/commit/4bcb2ac46a585205cbf3886b3df78179b34b18b1#diff-f2270f557e6afedd3e082f4dd8478d1c96dea051d6ea2e5b1229c0bb58d3d7f4R341

Proposed change

Type of change

  • [x] Dependency upgrade
  • [x] Bugfix (non-breaking change which fixes an issue)
  • [ ] New service (thank you!)
  • [ ] New feature (which adds functionality to an existing service)
  • [ ] Breaking change (fix/feature causing existing functionality to break)
  • [ ] Code quality improvements to existing code or addition of tests
  • [ ] Documentation or code sample

Additional information

  • This pr should resolve the authentication issue being seen here: https://github.com/picklepete/pyicloud/issues/441
  • uses the technique shown here: https://github.com/icloud-photos-downloader/icloud_photos_downloader/commit/4bcb2ac46a585205cbf3886b3df78179b34b18b1#diff-f2270f557e6afedd3e082f4dd8478d1c96dea051d6ea2e5b1229c0bb58d3d7f4R341

Checklist

  • [x] The code change is tested and works locally.
  • [ ] Local tests pass. Your PR cannot be merged unless tests pass
  • [ ] There is no commented out code in this PR.
  • [ ] Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

  • [ ] Documentation added/updated to README

irakhlin avatar Oct 22 '24 14:10 irakhlin

@picklepete @coddingtonbear we are trying to get icloud in Home assistant working again, can you please review..

PaulCavill avatar Oct 24 '24 08:10 PaulCavill

@torarnv @Quentame

PaulCavill avatar Oct 29 '24 09:10 PaulCavill

impacting quite a few projects. think a few more places worth referencing, like this also shows up in issue #456

karljtaylor avatar Oct 29 '24 23:10 karljtaylor

@balloob can you help with this?

PaulCavill avatar Oct 30 '24 05:10 PaulCavill

@irakhlin @PaulCavill @codebar33 I had 2 users with valid passwords that failed to login. The passwords are: qT*k74Ty] latD620!

@codebar33 passed along code they are using at iMazing you may want to review. It corrects the problem caused by the password_hash not being calculated with the latest SRP-6A protocol.

See here and here

I am away so I have not been able to test this code update in iCloud3.

gcobb321 avatar Nov 13 '24 01:11 gcobb321

@nzapponi Nick, As I recall from a login time ago, you had code approval for pyicloud. Do you think you could help out here?

gcobb321 avatar Nov 13 '24 02:11 gcobb321

@gcobb321 I have added the code in the links you provided, Will do some testing with the supplied passwords tomorrow.

https://github.com/irakhlin/pyicloud/compare/master...PaulCavill:pyicloud:master

@irakhlin Can you please sync your fork.

PaulCavill avatar Nov 13 '24 10:11 PaulCavill

@gcobb321 After going through so many debug logs. I now have the 2 above passwords working on my install, by adding another Execption Handle to a try block.

image

PaulCavill avatar Nov 14 '24 10:11 PaulCavill

Reports are that this PR fixes the recent (last few days) change in iCloud's system preventing login. @picklepete , are you able to merge and release?

dathbe avatar Nov 18 '25 00:11 dathbe

This is now managed by https://github.com/timlaing/pyicloud, he took over the pypi project.

PaulCavill avatar Nov 18 '25 00:11 PaulCavill

@dathbe That code has already been incorporated into the pypi project mentioned above.

gcobb321 avatar Nov 18 '25 22:11 gcobb321

hmm. I must be on an old version then.

dathbe avatar Nov 19 '25 01:11 dathbe