1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2025-07-31 12:41:08 +00:00

Implemented OTP #341

This commit is contained in:
Real-Gecko 2020-10-08 17:57:51 +06:00
parent cbac82ba07
commit 0052323190
7 changed files with 129 additions and 19 deletions

9
accounts/utils.py Normal file
View file

@ -0,0 +1,9 @@
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