mirror of
https://github.com/retspen/webvirtcloud
synced 2024-11-01 03:54:15 +00:00
10 lines
265 B
Python
10 lines
265 B
Python
|
from django_otp import devices_for_user
|
||
|
from django_otp.plugins.otp_totp.models import TOTPDevice
|
||
|
|
||
|
|
||
|
def get_user_totp_device(user):
|
||
|
devices = devices_for_user(user)
|
||
|
for device in devices:
|
||
|
if isinstance(device, TOTPDevice):
|
||
|
return device
|