Closed EngFarisAlsmawi closed 2 years ago
Yes, we should do like https://github.com/django-otp/django-otp/blob/master/src/django_otp/plugins/otp_email/models.py#L70, (device.email or device.user.email
). Would you like to provide a patch, with a regression test?
https://github.com/jazzband/django-two-factor-auth/blob/fe6c940d93a254dd7d2623c3a4752f69ea6ac1db/two_factor/plugins/email/method.py#L40
A method masked_email will be raise AttributeError when invoke get_action method, If you create device instance without email .
AttributeError at /account/two_factor/ 'NoneType' object has no attribute 'split'