mirror of
https://github.com/retspen/webvirtcloud.git
synced 2026-05-30 17:09:37 +00:00
Implemented OTP #341
This commit is contained in:
9
accounts/utils.py
Normal file
9
accounts/utils.py
Normal 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
|
||||
Reference in New Issue
Block a user