@@ -439,55 +439,56 @@ if (testContext.enableMFA) {
439439 } )
440440 ) ;
441441}
442-
443- SuperTokens . init ( {
444- usesDynamicLoginMethods : testContext . usesDynamicLoginMethods ,
445- clientType : testContext . clientType ,
446- enableDebugLogs : true ,
447- appInfo : {
448- appName : "SuperTokens" ,
449- websiteDomain : getWebsiteDomain ( ) ,
450- apiDomain : getApiDomain ( ) ,
451- websiteBasePath,
452- } ,
453- languageTranslations : {
454- translations : {
455- en : {
456- AUTH_PAGE_FOOTER_TOS : "TOS" ,
457- } ,
458- hu : {
459- AUTH_PAGE_FOOTER_TOS : "ÁSZF" ,
442+ if ( ! window . location . pathname . startsWith ( "/mockProvider" ) ) {
443+ SuperTokens . init ( {
444+ usesDynamicLoginMethods : testContext . usesDynamicLoginMethods ,
445+ clientType : testContext . clientType ,
446+ enableDebugLogs : true ,
447+ appInfo : {
448+ appName : "SuperTokens" ,
449+ websiteDomain : getWebsiteDomain ( ) ,
450+ apiDomain : getApiDomain ( ) ,
451+ websiteBasePath,
452+ } ,
453+ languageTranslations : {
454+ translations : {
455+ en : {
456+ AUTH_PAGE_FOOTER_TOS : "TOS" ,
457+ } ,
458+ hu : {
459+ AUTH_PAGE_FOOTER_TOS : "ÁSZF" ,
460+ } ,
460461 } ,
461462 } ,
462- } ,
463- getRedirectionURL : ( context ) => {
464- if ( context . action === "SUCCESS" ) {
465- let logId = {
466- emailpassword : "EMAIL_PASSWORD" ,
467- thirdparty : "THIRD_PARTY" ,
468- passwordless : "PASSWORDLESS" ,
469- thirdpartypasswordless : "THIRDPARTYPASSWORDLESS" ,
470- thirdpartyemailpassword : "THIRD_PARTY_EMAIL_PASSWORD" ,
471- } [ context . recipeId ] ;
472-
473- console . log ( `ST_LOGS SUPERTOKENS GET_REDIRECTION_URL SUCCESS ${ logId } ` ) ;
474- setIsNewUserToStorage ( context . recipeId , context . isNewRecipeUser ) ;
475- if ( testContext . disableRedirectionAfterSuccessfulSignInUp ) {
476- return null ;
463+ getRedirectionURL : ( context ) => {
464+ if ( context . action === "SUCCESS" ) {
465+ let logId = {
466+ emailpassword : "EMAIL_PASSWORD" ,
467+ thirdparty : "THIRD_PARTY" ,
468+ passwordless : "PASSWORDLESS" ,
469+ thirdpartypasswordless : "THIRDPARTYPASSWORDLESS" ,
470+ thirdpartyemailpassword : "THIRD_PARTY_EMAIL_PASSWORD" ,
471+ } [ context . recipeId ] ;
472+
473+ console . log ( `ST_LOGS SUPERTOKENS GET_REDIRECTION_URL SUCCESS ${ logId } ` ) ;
474+ setIsNewUserToStorage ( context . recipeId , context . isNewRecipeUser ) ;
475+ if ( testContext . disableRedirectionAfterSuccessfulSignInUp ) {
476+ return null ;
477+ }
478+ console . log ( JSON . stringify ( context ) ) ;
479+ return context . redirectToPath || "/dashboard" ;
480+ } else {
481+ console . log ( `ST_LOGS SUPERTOKENS GET_REDIRECTION_URL ${ context . action } ` ) ;
477482 }
478- console . log ( JSON . stringify ( context ) ) ;
479- return context . redirectToPath || "/dashboard" ;
480- } else {
481- console . log ( `ST_LOGS SUPERTOKENS GET_REDIRECTION_URL ${ context . action } ` ) ;
482- }
483- } ,
484- useShadowDom,
485- privacyPolicyLink : "https://supertokens.com/legal/privacy-policy" ,
486- termsOfServiceLink : "https://supertokens.com/legal/terms-and-conditions" ,
487- defaultToSignUp,
488- disableAuthRoute : testContext . disableDefaultUI ,
489- recipeList,
490- } ) ;
483+ } ,
484+ useShadowDom,
485+ privacyPolicyLink : "https://supertokens.com/legal/privacy-policy" ,
486+ termsOfServiceLink : "https://supertokens.com/legal/terms-and-conditions" ,
487+ defaultToSignUp,
488+ disableAuthRoute : testContext . disableDefaultUI ,
489+ recipeList,
490+ } ) ;
491+ }
491492
492493/* App */
493494function App ( ) {
0 commit comments