mirror of
https://github.com/home-assistant/core.git
synced 2025-07-09 06:17:07 +00:00
Fixed auth issue for non-2FA iCloud accounts (#48455)
This commit is contained in:
parent
2fbe352ad5
commit
fc8dc038e2
@ -115,8 +115,7 @@ class IcloudAccount:
|
|||||||
with_family=self._with_family,
|
with_family=self._with_family,
|
||||||
)
|
)
|
||||||
|
|
||||||
if not self.api.is_trusted_session or self.api.requires_2fa:
|
if self.api.requires_2fa:
|
||||||
# Session is no longer trusted
|
|
||||||
# Trigger a new log in to ensure the user enters the 2FA code again.
|
# Trigger a new log in to ensure the user enters the 2FA code again.
|
||||||
raise PyiCloudFailedLoginException
|
raise PyiCloudFailedLoginException
|
||||||
|
|
||||||
@ -163,7 +162,7 @@ class IcloudAccount:
|
|||||||
if self.api is None:
|
if self.api is None:
|
||||||
return
|
return
|
||||||
|
|
||||||
if not self.api.is_trusted_session or self.api.requires_2fa:
|
if self.api.requires_2fa:
|
||||||
self._require_reauth()
|
self._require_reauth()
|
||||||
return
|
return
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user