From d26f5f5e441d1108261bc865b2692936e5e60214 Mon Sep 17 00:00:00 2001 From: Josh XT Date: Mon, 5 Aug 2024 08:11:14 -0400 Subject: [PATCH] return otp uri on register --- agixtsdk/__init__.py | 3 ++- setup.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/agixtsdk/__init__.py b/agixtsdk/__init__.py index e9d9b12..4a74181 100644 --- a/agixtsdk/__init__.py +++ b/agixtsdk/__init__.py @@ -114,7 +114,8 @@ def register_user(self, email, first_name, last_name): if "otp_uri" in response: mfa_token = str(response["otp_uri"]).split("secret=")[1].split("&")[0] totp = pyotp.TOTP(mfa_token) - return self.login(email=email, otp=totp.now()) + self.login(email=email, otp=totp.now()) + return response["otp_uri"] else: return response diff --git a/setup.py b/setup.py index aa2a900..5c8ba54 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ setup( name="agixtsdk", - version="0.0.59", + version="0.0.60", description="The AGiXT SDK for Python.", long_description=long_description, long_description_content_type="text/markdown",