@@ -449,53 +449,55 @@ if (testContext.enableMFA) {
449449 ) ;
450450}
451451
452- SuperTokens . init ( {
453- usesDynamicLoginMethods : testContext . usesDynamicLoginMethods ,
454- clientType : testContext . clientType ,
455- appInfo : {
456- appName : "SuperTokens" ,
457- websiteDomain : getWebsiteDomain ( ) ,
458- apiDomain : getApiDomain ( ) ,
459- websiteBasePath,
460- } ,
461- languageTranslations : {
462- translations : {
463- en : {
464- AUTH_PAGE_FOOTER_TOS : "TOS" ,
465- } ,
466- hu : {
467- AUTH_PAGE_FOOTER_TOS : "ÁSZF" ,
452+ if ( ! window . location . pathname . startsWith ( "/mockProvider" ) ) {
453+ SuperTokens . init ( {
454+ usesDynamicLoginMethods : testContext . usesDynamicLoginMethods ,
455+ clientType : testContext . clientType ,
456+ appInfo : {
457+ appName : "SuperTokens" ,
458+ websiteDomain : getWebsiteDomain ( ) ,
459+ apiDomain : getApiDomain ( ) ,
460+ websiteBasePath,
461+ } ,
462+ languageTranslations : {
463+ translations : {
464+ en : {
465+ AUTH_PAGE_FOOTER_TOS : "TOS" ,
466+ } ,
467+ hu : {
468+ AUTH_PAGE_FOOTER_TOS : "ÁSZF" ,
469+ } ,
468470 } ,
469471 } ,
470- } ,
471- getRedirectionURL : ( context ) => {
472- if ( context . action === "SUCCESS" ) {
473- let logId = {
474- emailpassword : "EMAIL_PASSWORD" ,
475- thirdparty : "THIRD_PARTY" ,
476- passwordless : "PASSWORDLESS" ,
477- thirdpartypasswordless : "THIRDPARTYPASSWORDLESS" ,
478- thirdpartyemailpassword : "THIRD_PARTY_EMAIL_PASSWORD" ,
479- } [ context . recipeId ] ;
480-
481- console . log ( `ST_LOGS SUPERTOKENS GET_REDIRECTION_URL SUCCESS ${ logId } ` ) ;
482- setIsNewUserToStorage ( context . recipeId , context . isNewRecipeUser ) ;
483- if ( testContext . disableRedirectionAfterSuccessfulSignInUp ) {
484- return null ;
472+ getRedirectionURL : ( context ) => {
473+ if ( context . action === "SUCCESS" ) {
474+ let logId = {
475+ emailpassword : "EMAIL_PASSWORD" ,
476+ thirdparty : "THIRD_PARTY" ,
477+ passwordless : "PASSWORDLESS" ,
478+ thirdpartypasswordless : "THIRDPARTYPASSWORDLESS" ,
479+ thirdpartyemailpassword : "THIRD_PARTY_EMAIL_PASSWORD" ,
480+ } [ context . recipeId ] ;
481+
482+ console . log ( `ST_LOGS SUPERTOKENS GET_REDIRECTION_URL SUCCESS ${ logId } ` ) ;
483+ setIsNewUserToStorage ( context . recipeId , context . isNewRecipeUser ) ;
484+ if ( testContext . disableRedirectionAfterSuccessfulSignInUp ) {
485+ return null ;
486+ }
487+ console . log ( JSON . stringify ( context ) ) ;
488+ return context . redirectToPath || "/dashboard" ;
489+ } else {
490+ console . log ( `ST_LOGS SUPERTOKENS GET_REDIRECTION_URL ${ context . action } ` ) ;
485491 }
486- console . log ( JSON . stringify ( context ) ) ;
487- return context . redirectToPath || "/dashboard" ;
488- } else {
489- console . log ( `ST_LOGS SUPERTOKENS GET_REDIRECTION_URL ${ context . action } ` ) ;
490- }
491- } ,
492- useShadowDom,
493- privacyPolicyLink : "https://supertokens.com/legal/privacy-policy" ,
494- termsOfServiceLink : "https://supertokens.com/legal/terms-and-conditions" ,
495- defaultToSignUp,
496- disableAuthRoute : testContext . disableDefaultUI ,
497- recipeList,
498- } ) ;
492+ } ,
493+ useShadowDom,
494+ privacyPolicyLink : "https://supertokens.com/legal/privacy-policy" ,
495+ termsOfServiceLink : "https://supertokens.com/legal/terms-and-conditions" ,
496+ defaultToSignUp,
497+ disableAuthRoute : testContext . disableDefaultUI ,
498+ recipeList,
499+ } ) ;
500+ }
499501
500502/* App */
501503function App ( ) {
0 commit comments