b-jesch / service.fritzbox.callmonitor

Fritzbox callmonitor shows incoming/outgoing calls and pause audio/video/tv while connecting
GNU General Public License v2.0
13 stars 2 forks source link

2Factor Authenticaton failed #9

Open b-jesch opened 7 years ago

b-jesch commented 7 years ago

Hi Lutz,

reported here: http://www.kodinerds.net/index.php/Thread/43850-RELEASE-Noch-ein-Addon-f%C3%BCr-die-Fritzbox-Fritzbox-Callmonitor/?postID=324067#post324067

lutzleonhardt commented 7 years ago

Hi b-jesch,

at the moment it will only work if you disable the 2-factor authorization (in the apple account). The code is based on pyicloud. We have to integrate this code to make it work with 2-factor authorization (https://github.com/picklepete/pyicloud/blob/254e6a7b4430b24b0f34516e89ba279c30696957/README.rst):

if api.requires_2fa:
    import click
    print "Two-factor authentication required. Your trusted devices are:"

    devices = api.trusted_devices
    for i, device in enumerate(devices):
        print "  %s: %s" % (i, device.get('deviceName',
            "SMS to %s" % device.get('phoneNumber')))

    device = click.prompt('Which device would you like to use?', default=0)
    device = devices[device]
    if not api.send_verification_code(device):
        print "Failed to send verification code"
        sys.exit(1)

    code = click.prompt('Please enter validation code')
    if not api.validate_verification_code(device, code):
        print "Failed to verify verification code"
        sys.exit(1)
lutzleonhardt commented 7 years ago

We have to integrate this in the config dialog. But the authorization has to be renewed every 2 months. That means we need a dialog inside the callmonitor.

Do you have time to implement this. At the mom I am very busy.