Skip to content

Commit

Permalink
fixes stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
rishabhpoddar committed Sep 30, 2024
1 parent 9e78f99 commit 5d0c4d3
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 17 deletions.
4 changes: 0 additions & 4 deletions supertokens_python/auth_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -924,12 +924,8 @@ async def get_factors_set_up_for_user() -> List[str]:
async def get_mfa_requirements_for_auth():
nonlocal mfa_info_prom
if mfa_info_prom is None:
from .recipe.multifactorauth.multi_factor_auth_claim import (
MultiFactorAuthClaim,
)

mfa_info_prom = await update_and_get_mfa_related_info_in_session(
MultiFactorAuthClaim,
input_session=session,
user_context=user_context,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ async def resync_session_and_fetch_mfa_info_put(
)

mfa_info = await module.update_and_get_mfa_related_info_in_session(
MultiFactorAuthClaim,
input_session=session,
user_context=user_context,
)
Expand Down
6 changes: 0 additions & 6 deletions supertokens_python/recipe/multifactorauth/asyncio/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,7 @@ async def assert_allowed_to_setup_factor_else_throw_invalid_claim_error(
if user_context is None:
user_context = {}

from ..multi_factor_auth_claim import MultiFactorAuthClaim

mfa_info = await update_and_get_mfa_related_info_in_session(
MultiFactorAuthClaim,
input_session=session,
user_context=user_context,
)
Expand Down Expand Up @@ -69,10 +66,7 @@ async def get_mfa_requirements_for_auth(
if user_context is None:
user_context = {}

from ..multi_factor_auth_claim import MultiFactorAuthClaim

mfa_info = await update_and_get_mfa_related_info_in_session(
MultiFactorAuthClaim,
input_session=session,
user_context=user_context,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,6 @@ async def fetch_value(
)

mfa_info = await module.update_and_get_mfa_related_info_in_session(
self,
input_session_recipe_user_id=recipe_user_id,
input_tenant_id=tenant_id,
input_access_token_payload=current_payload,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,6 @@ async def mark_factor_as_complete_in_session(
)

await module.update_and_get_mfa_related_info_in_session(
MultiFactorAuthClaim,
input_session=session,
input_updated_factor_id=factor_id,
user_context=user_context,
Expand Down
7 changes: 3 additions & 4 deletions supertokens_python/recipe/multifactorauth/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
# under the License.
from __future__ import annotations
from typing import TYPE_CHECKING, List, Optional, Union, Dict, Any
from supertokens_python.recipe.multifactorauth.multi_factor_auth_claim import (
MultiFactorAuthClaim,
)
from supertokens_python.recipe.multitenancy.asyncio import get_tenant
from supertokens_python.recipe.multitenancy.recipe import MultitenancyRecipe
from supertokens_python.recipe.session import SessionContainer
Expand All @@ -32,9 +35,6 @@

if TYPE_CHECKING:
from .types import OverrideConfig, MultiFactorAuthConfig
from supertokens_python.recipe.multifactorauth.multi_factor_auth_claim import (
MultiFactorAuthClaimClass,
)


def validate_and_normalise_user_input(
Expand Down Expand Up @@ -70,7 +70,6 @@ def __init__(


async def update_and_get_mfa_related_info_in_session(
MultiFactorAuthClaim: MultiFactorAuthClaimClass,
user_context: Dict[str, Any],
input_session_recipe_user_id: Optional[RecipeUserId] = None,
input_tenant_id: Optional[str] = None,
Expand Down

0 comments on commit 5d0c4d3

Please sign in to comment.