Skip to content

Commit

Permalink
add random otp to social accounts
Browse files Browse the repository at this point in the history
  • Loading branch information
wh1te909 committed Oct 31, 2024
1 parent 41e3d1f commit a6166a1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions api/tacticalrmm/ee/sso/adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
For details, see: https://license.tacticalrmm.com/ee
"""

import pyotp
from allauth.socialaccount.adapter import DefaultSocialAccountAdapter
from allauth.socialaccount.models import SocialApp
from django.core.exceptions import PermissionDenied
Expand All @@ -26,6 +27,7 @@ def populate_user(self, request, sociallogin, data):
logger.debug(
"Provider settings or Role not found. Continuing with blank permissions."
)
user.totp_key = pyotp.random_base32() # not actually used
return user

def is_open_for_signup(self, request, sociallogin):
Expand Down

0 comments on commit a6166a1

Please sign in to comment.