jeffreydwalter / arlo

Python module for interacting with Netgear's Arlo camera system.
Apache License 2.0
517 stars 124 forks source link

Support for the multiple verification emails #177

Closed samiveikko closed 2 years ago

samiveikko commented 2 years ago

I noticed that if I use a different email for the Arlo account and a different email for the verification, the current code can't handle it. Email_factor_id parsing code in arlo.py need to be modified so that it will also check that item is the primary email.

email_factor_id = next(i for i in factors_body['data']['items'] if i['factorType'] == 'EMAIL' and i['factorRole'] == "PRIMARY")['factorId']

jeffreydwalter commented 2 years ago

I would be happy to merge a PR for this. Thank you!