Skip to content

Commit

Permalink
fix: cyclic import
Browse files Browse the repository at this point in the history
  • Loading branch information
sattvikc committed Dec 30, 2024
1 parent 873ce29 commit f575893
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion examples/with-flask/with-thirdpartyemailpassword/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@
dashboard,
emailverification,
session,
usermetadata,
thirdparty,
)
from supertokens_python.recipe.session import SessionContainer
from supertokens_python.recipe.session.framework.flask import verify_session

load_dotenv()
Expand Down Expand Up @@ -46,6 +48,7 @@ def get_website_domain():
session.init(),
dashboard.init(),
emailverification.init("REQUIRED"),
usermetadata.init(),
thirdparty.init(
sign_in_and_up_feature=thirdparty.SignInAndUpFeature(
providers=[
Expand Down Expand Up @@ -156,7 +159,7 @@ def get_website_domain():
@app.route("/sessioninfo", methods=["GET"]) # type: ignore
@verify_session()
def get_session_info():
session_: session.SessionContainer = g.supertokens
session_: SessionContainer = g.supertokens
return jsonify(
{
"sessionHandle": session_.get_handle(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
ErrorOAuth2Response,
)
from supertokens_python.recipe.session import SessionContainer
from supertokens_python.recipe.session.exceptions import TryRefreshTokenError

EndSessionCallable = Callable[
[Dict[str, str], APIOptions, Optional[SessionContainer], bool, Dict[str, Any]],
Expand Down Expand Up @@ -84,6 +83,7 @@ async def end_session_common(
) -> Optional[BaseResponse]:
from ..interfaces import RedirectResponse, ErrorOAuth2Response
from supertokens_python.recipe.session.asyncio import get_session
from supertokens_python.recipe.session.exceptions import TryRefreshTokenError

if api_implementation is None:
return None
Expand Down

0 comments on commit f575893

Please sign in to comment.