@@ -459,48 +459,50 @@ if (testContext.enableMFA) {
459459 ) ;
460460}
461461
462- SuperTokens . init ( {
463- usesDynamicLoginMethods : testContext . usesDynamicLoginMethods ,
464- clientType : testContext . clientType ,
465- appInfo : {
466- appName : "SuperTokens" ,
467- websiteDomain : getWebsiteDomain ( ) ,
468- apiDomain : getApiDomain ( ) ,
469- websiteBasePath,
470- } ,
471- languageTranslations : {
472- translations : {
473- en : {
474- PWLESS_SIGN_IN_UP_FOOTER_TOS : "TOS" ,
475- } ,
476- hu : {
477- PWLESS_SIGN_IN_UP_FOOTER_TOS : "ÁSZF" ,
462+ if ( ! window . location . pathname . startsWith ( "/mockProvider" ) ) {
463+ SuperTokens . init ( {
464+ usesDynamicLoginMethods : testContext . usesDynamicLoginMethods ,
465+ clientType : testContext . clientType ,
466+ appInfo : {
467+ appName : "SuperTokens" ,
468+ websiteDomain : getWebsiteDomain ( ) ,
469+ apiDomain : getApiDomain ( ) ,
470+ websiteBasePath,
471+ } ,
472+ languageTranslations : {
473+ translations : {
474+ en : {
475+ PWLESS_SIGN_IN_UP_FOOTER_TOS : "TOS" ,
476+ } ,
477+ hu : {
478+ PWLESS_SIGN_IN_UP_FOOTER_TOS : "ÁSZF" ,
479+ } ,
478480 } ,
479481 } ,
480- } ,
481- getRedirectionURL : ( context ) => {
482- if ( context . action === "SUCCESS" ) {
483- let logId = {
484- emailpassword : "EMAIL_PASSWORD" ,
485- thirdparty : "THIRD_PARTY" ,
486- passwordless : "PASSWORDLESS" ,
487- thirdpartypasswordless : "THIRDPARTYPASSWORDLESS" ,
488- thirdpartyemailpassword : "THIRD_PARTY_EMAIL_PASSWORD" ,
489- } [ context . recipeId ] ;
490-
491- console . log ( `ST_LOGS SUPERTOKENS GET_REDIRECTION_URL SUCCESS ${ logId } ` ) ;
492- setIsNewUserToStorage ( context . recipeId , context . isNewRecipeUser ) ;
493- if ( testContext . disableRedirectionAfterSuccessfulSignInUp ) {
494- return null ;
482+ getRedirectionURL : ( context ) => {
483+ if ( context . action === "SUCCESS" ) {
484+ let logId = {
485+ emailpassword : "EMAIL_PASSWORD" ,
486+ thirdparty : "THIRD_PARTY" ,
487+ passwordless : "PASSWORDLESS" ,
488+ thirdpartypasswordless : "THIRDPARTYPASSWORDLESS" ,
489+ thirdpartyemailpassword : "THIRD_PARTY_EMAIL_PASSWORD" ,
490+ } [ context . recipeId ] ;
491+
492+ console . log ( `ST_LOGS SUPERTOKENS GET_REDIRECTION_URL SUCCESS ${ logId } ` ) ;
493+ setIsNewUserToStorage ( context . recipeId , context . isNewRecipeUser ) ;
494+ if ( testContext . disableRedirectionAfterSuccessfulSignInUp ) {
495+ return null ;
496+ }
497+ console . log ( JSON . stringify ( context ) ) ;
498+ return context . redirectToPath || "/dashboard" ;
499+ } else {
500+ console . log ( `ST_LOGS SUPERTOKENS GET_REDIRECTION_URL ${ context . action } ` ) ;
495501 }
496- console . log ( JSON . stringify ( context ) ) ;
497- return context . redirectToPath || "/dashboard" ;
498- } else {
499- console . log ( `ST_LOGS SUPERTOKENS GET_REDIRECTION_URL ${ context . action } ` ) ;
500- }
501- } ,
502- recipeList,
503- } ) ;
502+ } ,
503+ recipeList,
504+ } ) ;
505+ }
504506
505507/* App */
506508function App ( ) {
0 commit comments