Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proper App Specific Password Support? #26

Open
rcmaehl opened this issue Jan 8, 2025 · 7 comments
Open

Proper App Specific Password Support? #26

rcmaehl opened this issue Jan 8, 2025 · 7 comments
Assignees

Comments

@rcmaehl
Copy link

rcmaehl commented Jan 8, 2025

Hiya, just dropping this here.

I was the one that got the iCloud App Specific Password "support" added to Home Assistant for pyicloud. It is jerry-rigged due to me not knowing how to edit pyicloud itself, and eventually broke when Apple Implemented SRP-6a. The process was as follows:

Initial Auth via Username + Password
Force Reauth
Reauth using App Specific Password

I'm not sure exactly the code path that was used but proper implementation of App Specific Passwords would be greatly appreciated!

This may be useful in regards to SRP-6a: home-assistant/core#129059

@timlaing
Copy link
Owner

timlaing commented Jan 8, 2025

If you would like to add / contribute to this repo this would be great. Thanks for the info.

@timlaing timlaing self-assigned this Jan 10, 2025
@PaulCavill
Copy link

@rcmaehl How were you forcing Reauth in the past?

@rcmaehl
Copy link
Author

rcmaehl commented Jan 15, 2025

@rcmaehl How were you forcing Reauth in the past?

Just reloading the integration was usually enough

@paullenhardt
Copy link

App specific passwords already work in pyicloud (see KB: https://support.apple.com/en-us/102654 where you create the app specific passcode via account.apple.com). Using an app specific passcode works just fine with the existing pyicloud. You just substitute the main account password with the app specific passcode. It works well and doesn't require 2FA.

Is the process that you were are looking for is to have pyicloud use the main account password and then generate a new app specific passcode which is then stored and used for all future authentications?

@rcmaehl
Copy link
Author

rcmaehl commented Feb 8, 2025

App specific passwords already work in pyicloud (see KB: https://support.apple.com/en-us/102654 where you create the app specific passcode via account.apple.com). Using an app specific passcode works just fine with the existing pyicloud. You just substitute the main account password with the app specific passcode. It works well and doesn't require 2FA.

Is the process that you were are looking for is to have pyicloud use the main account password and then generate a new app specific passcode which is then stored and used for all future authentications?

No. For some reason app-specific passwords were not working for the initial setup of pyicloud within HomeAssistant and possibly not working on pyicloud itself (see picklepete/pyicloud github issue tracker)

@paullenhardt
Copy link

paullenhardt commented Feb 9, 2025

No. For some reason app-specific passwords were not working for the initial setup of pyicloud within HomeAssistant and possibly not working on pyicloud itself (see picklepete/pyicloud github issue tracker)

I tested it against the old picklepete/pyicloud and it does indeed have an issue with app specific passwords. The version here on timlaing/pyicloud works with app specific passwords. It looks like you are already aware of the request to take over the pyicloud project on PYPI (pypi/support#5377). I'm not sure what further can be done until that process is complete. Once it is, App specific passwords should immediately work under the current version of pyicloud maintained by @timlaing.

@timlaing
Copy link
Owner

Glad that this is working for you all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants