Skip to content

Commit c7f87ac

Browse files
authored
Merge branch 'feat/tp-rework' into feat/dashboard-mt
2 parents 3807168 + fee89fb commit c7f87ac

File tree

5 files changed

+10
-8
lines changed

5 files changed

+10
-8
lines changed

supertokens_python/recipe/dashboard/api/userdetails/user_sessions_get.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,10 @@ async def handle_sessions_get(
2626
if user_id is None:
2727
raise_bad_input_exception("Missing required parameter 'userId'")
2828

29+
# Passing tenant id as None sets fetch_across_all_tenants to True
30+
# which is what we want here.
2931
session_handles = await get_all_session_handles_for_user(
30-
user_id, tenant_id, user_context
32+
user_id, None, user_context
3133
)
3234
sessions: List[Optional[SessionInfo]] = [None for _ in session_handles]
3335

supertokens_python/recipe/session/asyncio/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ async def revoke_all_sessions_for_user(
441441

442442
async def get_all_session_handles_for_user(
443443
user_id: str,
444-
tenant_id: Optional[str],
444+
tenant_id: Optional[str] = None,
445445
user_context: Union[None, Dict[str, Any]] = None,
446446
) -> List[str]:
447447
if user_context is None:

supertokens_python/recipe/session/interfaces.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ async def revoke_all_sessions_for_user(
219219
self,
220220
user_id: str,
221221
tenant_id: str,
222-
revoke_across_all_tenants: Optional[bool],
222+
revoke_across_all_tenants: bool,
223223
user_context: Dict[str, Any],
224224
) -> List[str]:
225225
pass
@@ -229,7 +229,7 @@ async def get_all_session_handles_for_user(
229229
self,
230230
user_id: str,
231231
tenant_id: str,
232-
fetch_across_all_tenants: Optional[bool],
232+
fetch_across_all_tenants: bool,
233233
user_context: Dict[str, Any],
234234
) -> List[str]:
235235
pass

supertokens_python/recipe/session/recipe_implementation.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ async def revoke_all_sessions_for_user(
330330
self,
331331
user_id: str,
332332
tenant_id: Optional[str],
333-
revoke_across_all_tenants: Optional[bool],
333+
revoke_across_all_tenants: bool,
334334
user_context: Dict[str, Any],
335335
) -> List[str]:
336336
return await session_functions.revoke_all_sessions_for_user(
@@ -341,7 +341,7 @@ async def get_all_session_handles_for_user(
341341
self,
342342
user_id: str,
343343
tenant_id: Optional[str],
344-
fetch_across_all_tenants: Optional[bool],
344+
fetch_across_all_tenants: bool,
345345
user_context: Dict[str, Any],
346346
) -> List[str]:
347347
return await session_functions.get_all_session_handles_for_user(

supertokens_python/recipe/session/session_functions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ async def revoke_all_sessions_for_user(
392392
recipe_implementation: RecipeImplementation,
393393
user_id: str,
394394
tenant_id: Optional[str],
395-
revoke_across_all_tenants: Optional[bool],
395+
revoke_across_all_tenants: bool,
396396
) -> List[str]:
397397
if tenant_id is None:
398398
tenant_id = DEFAULT_TENANT_ID
@@ -408,7 +408,7 @@ async def get_all_session_handles_for_user(
408408
recipe_implementation: RecipeImplementation,
409409
user_id: str,
410410
tenant_id: Optional[str],
411-
fetch_across_all_tenants: Optional[bool],
411+
fetch_across_all_tenants: bool,
412412
) -> List[str]:
413413
if tenant_id is None:
414414
tenant_id = DEFAULT_TENANT_ID

0 commit comments

Comments
 (0)