@@ -106,19 +106,19 @@ def __init__(
106
106
api_domain : str ,
107
107
api_gateway_path : str = "" ,
108
108
api_base_path : str = "/auth" ,
109
- website_base_path : str = "/auth" ,
110
- website_domain : Optional [str ] = None ,
109
+ client_base_path : str = "/auth" ,
110
+ client_domain : Optional [str ] = None ,
111
111
origin : Optional [
112
112
Union [str , Callable [[Optional [BaseRequest ], Dict [str , Any ]], str ]]
113
113
] = None ,
114
114
):
115
115
self .app_name = app_name
116
116
self .api_gateway_path = api_gateway_path
117
117
self .api_domain = api_domain
118
- self .website_domain = website_domain
118
+ self .client_domain = client_domain
119
119
self .origin = origin
120
120
self .api_base_path = api_base_path
121
- self .website_base_path = website_base_path
121
+ self .client_base_path = client_base_path
122
122
123
123
124
124
class AppInfo :
@@ -238,9 +238,11 @@ def __init__(
238
238
hosts = list (
239
239
map (
240
240
lambda h : Host (
241
- NormalisedURLDomain (h .strip ()), NormalisedURLPath (h .strip ())
241
+ NormalisedURLDomain (
242
+ h .strip ()), NormalisedURLPath (h .strip ())
242
243
),
243
- filter (lambda x : x != "" , supertokens_config .connection_uri .split (";" )),
244
+ filter (lambda x : x != "" ,
245
+ supertokens_config .connection_uri .split (";" )),
244
246
)
245
247
)
246
248
Querier .init (
@@ -289,7 +291,8 @@ def make_recipe(recipe: Callable[[AppInfo], RecipeModule]) -> RecipeModule:
289
291
jwt_found = True
290
292
return recipe_module
291
293
292
- self .recipe_modules : List [RecipeModule ] = list (map (make_recipe , recipe_list ))
294
+ self .recipe_modules : List [RecipeModule ] = list (
295
+ map (make_recipe , recipe_list ))
293
296
294
297
if not jwt_found :
295
298
from supertokens_python .recipe .jwt .recipe import JWTRecipe
@@ -304,22 +307,26 @@ def make_recipe(recipe: Callable[[AppInfo], RecipeModule]) -> RecipeModule:
304
307
if not multitenancy_found :
305
308
from supertokens_python .recipe .multitenancy .recipe import MultitenancyRecipe
306
309
307
- self .recipe_modules .append (MultitenancyRecipe .init ()(self .app_info ))
310
+ self .recipe_modules .append (
311
+ MultitenancyRecipe .init ()(self .app_info ))
308
312
309
313
if totp_found and not multi_factor_auth_found :
310
- raise Exception ("Please initialize the MultiFactorAuth recipe to use TOTP." )
314
+ raise Exception (
315
+ "Please initialize the MultiFactorAuth recipe to use TOTP." )
311
316
312
317
if not user_metadata_found :
313
318
from supertokens_python .recipe .usermetadata .recipe import UserMetadataRecipe
314
319
315
- self .recipe_modules .append (UserMetadataRecipe .init ()(self .app_info ))
320
+ self .recipe_modules .append (
321
+ UserMetadataRecipe .init ()(self .app_info ))
316
322
317
323
if not oauth2_found :
318
324
from supertokens_python .recipe .oauth2provider .recipe import (
319
325
OAuth2ProviderRecipe ,
320
326
)
321
327
322
- self .recipe_modules .append (OAuth2ProviderRecipe .init ()(self .app_info ))
328
+ self .recipe_modules .append (
329
+ OAuth2ProviderRecipe .init ()(self .app_info ))
323
330
324
331
self .telemetry = (
325
332
telemetry
@@ -354,7 +361,8 @@ def reset():
354
361
if ("SUPERTOKENS_ENV" not in environ ) or (
355
362
environ ["SUPERTOKENS_ENV" ] != "testing"
356
363
):
357
- raise_general_exception ("calling testing function in non testing env" )
364
+ raise_general_exception (
365
+ "calling testing function in non testing env" )
358
366
from supertokens_python .recipe .usermetadata .recipe import UserMetadataRecipe
359
367
360
368
UserMetadataRecipe .reset ()
@@ -442,7 +450,8 @@ async def create_user_id_mapping(
442
450
443
451
raise_general_exception ("Unknown response" )
444
452
445
- raise_general_exception ("Please upgrade the SuperTokens core to >= 3.15.0" )
453
+ raise_general_exception (
454
+ "Please upgrade the SuperTokens core to >= 3.15.0" )
446
455
447
456
async def get_user_id_mapping (
448
457
self ,
@@ -476,7 +485,8 @@ async def get_user_id_mapping(
476
485
477
486
raise_general_exception ("Unknown response" )
478
487
479
- raise_general_exception ("Please upgrade the SuperTokens core to >= 3.15.0" )
488
+ raise_general_exception (
489
+ "Please upgrade the SuperTokens core to >= 3.15.0" )
480
490
481
491
async def delete_user_id_mapping (
482
492
self ,
@@ -508,7 +518,8 @@ async def delete_user_id_mapping(
508
518
509
519
raise_general_exception ("Unknown response" )
510
520
511
- raise_general_exception ("Please upgrade the SuperTokens core to >= 3.15.0" )
521
+ raise_general_exception (
522
+ "Please upgrade the SuperTokens core to >= 3.15.0" )
512
523
513
524
async def update_or_delete_user_id_mapping_info (
514
525
self ,
@@ -538,7 +549,8 @@ async def update_or_delete_user_id_mapping_info(
538
549
539
550
raise_general_exception ("Unknown response" )
540
551
541
- raise_general_exception ("Please upgrade the SuperTokens core to >= 3.15.0" )
552
+ raise_general_exception (
553
+ "Please upgrade the SuperTokens core to >= 3.15.0" )
542
554
543
555
async def middleware (
544
556
self , request : BaseRequest , response : BaseResponse , user_context : Dict [str , Any ]
@@ -595,7 +607,8 @@ async def handle_without_rid():
595
607
return None
596
608
log_debug_message ("middleware: Ended" )
597
609
return api_resp
598
- log_debug_message ("middleware: Not handling because no recipe matched" )
610
+ log_debug_message (
611
+ "middleware: Not handling because no recipe matched" )
599
612
return None
600
613
601
614
if request_rid is not None :
@@ -672,7 +685,8 @@ async def handle_supertokens_error(
672
685
) -> Optional [BaseResponse ]:
673
686
log_debug_message ("errorHandler: Started" )
674
687
log_debug_message (
675
- "errorHandler: Error is from SuperTokens recipe. Message: %s" , str (err )
688
+ "errorHandler: Error is from SuperTokens recipe. Message: %s" , str (
689
+ err )
676
690
)
677
691
if isinstance (err , GeneralError ):
678
692
raise err
0 commit comments