38
38
from supertokens_python .normalised_url_path import NormalisedURLPath
39
39
from supertokens_python .querier import Querier
40
40
from supertokens_python .recipe import session
41
+ from supertokens_python .recipe .accountlinking .recipe import AccountLinkingRecipe
41
42
from supertokens_python .recipe .jwt .recipe import JWTRecipe
42
43
from supertokens_python .recipe .multitenancy .recipe import MultitenancyRecipe
43
44
from supertokens_python .recipe .oauth2provider .recipe import OAuth2ProviderRecipe
@@ -282,16 +283,6 @@ def config(
282
283
)
283
284
284
285
285
- core_host = os .environ .get ("SUPERTOKENS_CORE_HOST" , "localhost" )
286
- core_port = os .environ .get ("SUPERTOKENS_CORE_PORT" , "3567" )
287
- config (
288
- core_url = f"http://{ core_host } :{ core_port } " ,
289
- enable_anti_csrf = True ,
290
- enable_jwt = False ,
291
- jwt_property_name = None ,
292
- )
293
-
294
-
295
286
@app .route ("/index.html" , methods = ["GET" ]) # type: ignore
296
287
def send_file ():
297
288
return render_template ("index.html" )
@@ -674,6 +665,7 @@ def reinitialize():
674
665
OpenIdRecipe .reset ()
675
666
OAuth2ProviderRecipe .reset ()
676
667
JWTRecipe .reset ()
668
+ AccountLinkingRecipe .reset ()
677
669
config (
678
670
json ["coreUrl" ],
679
671
last_set_enable_anti_csrf , # type: ignore
@@ -695,6 +687,7 @@ async def setup_st(): # type: ignore
695
687
OpenIdRecipe .reset ()
696
688
OAuth2ProviderRecipe .reset ()
697
689
JWTRecipe .reset ()
690
+ AccountLinkingRecipe .reset ()
698
691
config (
699
692
core_url = json ["coreUrl" ],
700
693
enable_anti_csrf = json .get ("enableAntiCsrf" ), # type: ignore
@@ -733,5 +726,14 @@ def handle_exception(e): # type: ignore
733
726
return Response (str (e ), status = 500 ) # type: ignore
734
727
735
728
729
+ core_host = os .environ .get ("SUPERTOKENS_CORE_HOST" , "localhost" )
730
+ core_port = os .environ .get ("SUPERTOKENS_CORE_PORT" , "3567" )
731
+ config (
732
+ core_url = f"http://{ core_host } :{ core_port } " ,
733
+ enable_anti_csrf = True ,
734
+ enable_jwt = False ,
735
+ jwt_property_name = None ,
736
+ )
737
+
736
738
if __name__ == "__main__" :
737
739
app .run (host = "0.0.0.0" , port = int (get_app_port ()), threaded = True )
0 commit comments