gcobb321 / icloud3_v3

iCloud3 v3, Development Version - This Repo/Version is used for development and testing of new and updated features. It is not the official release of iCloud3 v3, .
MIT License
150 stars 12 forks source link

Feature Request - App Password Support #78

Open polskikrol opened 1 year ago

polskikrol commented 1 year ago

Tried to search for an answer on this one. My understanding is that that the HA native icloud integration uses HTTP calls mimicking user behaviour rather than newer API calls. This is one reason why app specific passwords are not supported. Does icloud3_v3 (beta) support app specific passwords? Been trying to test this without much success.

gcobb321 commented 1 year ago

Not that I know of. iCloud3 uses a heavily modified version of the same iCloud module that is part of a Python library. The module is pyicloud.py at GitHub repository here that is now matinee by the Nabu Casa/Home Assistant guys.

gcobb321 commented 1 year ago

You mentioned newer API calls. Where are the docs for them? Are you part of the Apple Developer program?

polskikrol commented 1 year ago

I am not part of the Apple Developer program. Simply read quite a bit of information on the iCloud module, and apparently the way the calls are made are not modern. Hence the issues many people see with the re-authentication email messages, and what would appear lack of support for application passwords. Please see the following: https://github.com/home-assistant/core/issues/53926#issuecomment-944491590.

On Sat, Mar 4, 2023 at 3:11 AM Gary Cobb @.***> wrote:

You mentioned newer API calls. Where are the docs for them? Are you part of the Apple Developer program?

— Reply to this email directly, view it on GitHub https://github.com/gcobb321/icloud3_v3/issues/78#issuecomment-1454660835, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKAGRDA26ELDEFC3ESOKRO3W2L2KPANCNFSM6AAAAAAVOWV7MQ . You are receiving this because you authored the thread.Message ID: @.***>

gcobb321 commented 1 year ago

I will check it out further once iCloud3 v3 has been released (that is my first priority at the moment). And I totally agree that the pyicloud.py module is a mess, a lot of old code, it handles error recovery and retries in a strange manner and can use a rewrite but it seems to do the job at the moment. Support and updates are non-existent and, if you follow the issues and PR requests of the code, you see a lot of people trying to add features which never get into the base code.

The latest beta (b14) which I will be releasing in the next few days, addresses the Apple emails. Before b14, the password signin was the first thing that was done when access had to be reverified (about every 30-minutes or so). This generated the email from apple. Beta 14 uses the session token first, and then does the password signin if it had expired. I've been using that for about a week now and have received an email about once a day instead of many times during the day.

polskikrol commented 1 year ago

I will be happy to test this once it is made available, b14 that is. Slowly migrating away from the broken tracking feature on Vera for iPhones to HA, and tinkering with iCloud3 v3 due to the enhanced feature set. The whole app password option is nice as you can associate the token with a label/name such as homeassistant and then use your normal login email but use the password specific to the app that you generated.

On Sun, Mar 5, 2023 at 10:39 AM Gary Cobb @.***> wrote:

I will check it out further once iCloud3 v3 has been released (that is my first priority at the moment). And I totally agree that the pyicloud.py module is a mess, a lot of old code, it handles error recovery and retries in a strange manner and can use a rewrite but it seems to do the job at the moment. Support and updates are non-existent and, if you follow the issues and PR requests of the code, you see a lot of people trying to add features which never get into the base code.

The latest beta (b14) which I will be releasing in the next few days, addresses the Apple emails. Before b14, the password signin was the first thing that was done when access had to be reverified (about every 30-minutes or so). This generated the email from apple. Beta 14 uses the session token first, and then does the password signin if it had expired. I've been using that for about a week now and have received an email about once a day instead of many times during the day.

— Reply to this email directly, view it on GitHub https://github.com/gcobb321/icloud3_v3/issues/78#issuecomment-1455125668, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKAGRDF5CDUBI7VS4LKSSCLW2SXSXANCNFSM6AAAAAAVOWV7MQ . You are receiving this because you authored the thread.Message ID: @.***>