diff --git a/lib/build/recipe/thirdpartyemailpassword/recipe.d.ts b/lib/build/recipe/thirdpartyemailpassword/recipe.d.ts index 7b3a3d81e..c49bf3123 100644 --- a/lib/build/recipe/thirdpartyemailpassword/recipe.d.ts +++ b/lib/build/recipe/thirdpartyemailpassword/recipe.d.ts @@ -30,7 +30,7 @@ export default class Recipe extends RecipeModule { recipeId: string, appInfo: NormalisedAppinfo, isInServerlessEnv: boolean, - config: TypeInput, + config: TypeInput | undefined, recipes: { thirdPartyInstance: ThirdPartyRecipe | undefined; emailPasswordInstance: EmailPasswordRecipe | undefined; @@ -39,7 +39,7 @@ export default class Recipe extends RecipeModule { emailDelivery: EmailDeliveryIngredient | undefined; } ); - static init(config: TypeInput): RecipeListFunction; + static init(config?: TypeInput): RecipeListFunction; static reset(): void; static getInstanceOrThrowError(): Recipe; getAPIsHandled: () => APIHandled[]; diff --git a/lib/ts/recipe/thirdpartyemailpassword/recipe.ts b/lib/ts/recipe/thirdpartyemailpassword/recipe.ts index c9706f7c0..b80d3af31 100644 --- a/lib/ts/recipe/thirdpartyemailpassword/recipe.ts +++ b/lib/ts/recipe/thirdpartyemailpassword/recipe.ts @@ -61,7 +61,7 @@ export default class Recipe extends RecipeModule { recipeId: string, appInfo: NormalisedAppinfo, isInServerlessEnv: boolean, - config: TypeInput, + config: TypeInput | undefined, recipes: { thirdPartyInstance: ThirdPartyRecipe | undefined; emailPasswordInstance: EmailPasswordRecipe | undefined; @@ -156,7 +156,7 @@ export default class Recipe extends RecipeModule { } } - static init(config: TypeInput): RecipeListFunction { + static init(config?: TypeInput): RecipeListFunction { return (appInfo, isInServerlessEnv) => { if (Recipe.instance === undefined) { Recipe.instance = new Recipe( diff --git a/test/with-typescript/index.ts b/test/with-typescript/index.ts index 8b3bd2012..c80e549b0 100644 --- a/test/with-typescript/index.ts +++ b/test/with-typescript/index.ts @@ -1737,3 +1737,10 @@ async function refreshSessionWithoutRequestResponse(req: express.Request, resp: } } } + +ThirdParty.init(); +ThirdPartyEmailPassword.init(); +ThirdPartyPasswordless.init({ + contactMethod: "EMAIL", + flowType: "MAGIC_LINK", +});