mirror of
https://github.com/retspen/webvirtcloud
synced 2025-07-31 12:41:08 +00:00
Implemented OTP #341
This commit is contained in:
parent
cbac82ba07
commit
0052323190
7 changed files with 129 additions and 19 deletions
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
|
||||
Loading…
Add table
Add a link
Reference in a new issue