def get_form_kwargs(self, step=None):
        if step == 'validation':
            return {'device': self.get_device()}
        return {}
Provide the device to the DeviceValidationForm.
dataset/ETHPy150Open Bouke/django-two-factor-auth/two_factor/views/core.py/PhoneSetupView.get_form_kwargs