Skip to content

Commit

Permalink
add trust session to sms code verification
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreyNikiforov authored Jun 30, 2024
1 parent fe5049f commit 4d79569
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/pyicloud_ipd/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,10 @@ def validate_2fa_code_sms(self, device_id: int, code:int) -> bool:
).prepare()
response = self.send_request(request)

return response.ok
if response.ok:
return self.trust_session()
return False


def validate_2fa_code(self, code:str) -> bool:
"""Verifies a verification code received via Apple's 2FA system (HSA2)."""
Expand Down

0 comments on commit 4d79569

Please sign in to comment.