Skip to content

Commit

Permalink
Issue #194: Fix 2fa is email address isn't primary factor.
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffreydwalter committed Nov 17, 2022
1 parent 303ef6c commit 6c424dc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arlo.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,8 @@ def LoginMFA(self, username, password, google_credential_file):
raw=True
)
email_factor_id = next(i for i in factors_body['data']['items'] if i['factorType'] == 'EMAIL' and i['factorRole'] == "PRIMARY")['factorId']
if email_factor_id is None:
email_factor_id = next(i for i in factors_body['data']['items'] if i['factorType'] == 'EMAIL' and i['factorRole'] == "SECONDARY")['factorId']

# Start factor auth
start_auth_body = self.request.post(
Expand Down

0 comments on commit 6c424dc

Please sign in to comment.