Error Handling for MFA required #107
Closed
PaulCavill
started this conversation in
General
Replies: 4 comments 5 replies
-
Beta Was this translation helpful? Give feedback.
4 replies
-
|
I believe this has now been fixed in PR #124. @PaulCavill - if you want to test this it would be great. |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
@timlaing, I have this running now will montior. |
Beta Was this translation helpful? Give feedback.
1 reply
-
|
@timlaing Sorry for the late responce, my MFA expired today and i got the MFA prompt on my device once,. then the HA integration stop polling as expected. Thank you for your work :). |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm calling PyiCloudService.authenticate() before performing any actions. However, when 2FA is required, I’m not seeing any errors raised, and requires_2fa remains False.
2025-07-15 20:26:46.312 DEBUG [pyicloud.base] Checking session token validity
2025-07-15 20:26:47.520 DEBUG [pyicloud.base] Session token is still valid
2025-07-15 20:26:47.521 DEBUG [pyicloud.base] Authentication completed successfully
2025-07-15 20:26:47.521 DEBUG [icloud.account] Updating devices
2025-07-15 20:26:48.149 DEBUG [pyicloud.base] Authenticating as apple@apple.com
2025-07-15 20:26:52.915 DEBUG [pyicloud.base] 2FA required to complete authentication.
2025-07-15 20:26:55.662 DEBUG [pyicloud.base] 2FA is required
2025-07-15 20:26:55.662 DEBUG [pyicloud.base] Authentication completed successfully
Is this the intended behavior? Should the caller infer that 2FA is required from the logs, or should an exception be raised or requires_2fa be set to True in this case?
pyicloud/pyicloud/base.py
Lines 243 to 247 in 0cba718
Beta Was this translation helpful? Give feedback.
All reactions