Skip to content

Commit

Permalink
Support for the multiple verification emails (#177) (#179)
Browse files Browse the repository at this point in the history
Adding suggestion by @samiveikko to handle login gracefully when user's primary email address is not the same as their Arlo web portal login address
  • Loading branch information
Aeon authored Nov 29, 2021
1 parent 949ff05 commit 5bc54fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arlo.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ def LoginMFA(self, username, password, google_credential_file):
headers=headers,
raw=True
)
email_factor_id = next(i for i in factors_body['data']['items'] if i['factorType'] == 'EMAIL')['factorId']
email_factor_id = next(i for i in factors_body['data']['items'] if i['factorType'] == 'EMAIL' and i['factorRole'] == "PRIMARY")['factorId']

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

0 comments on commit 5bc54fb

Please sign in to comment.