@@ -107,29 +107,27 @@ func MakeRecipe(recipeId string, appInfo supertokens.NormalisedAppinfo, config t
107107 r .passwordlessRecipe = passwordlessInstance
108108 }
109109
110- if len (verifiedConfig .Providers ) > 0 {
111- if thirdPartyInstance == nil {
112- thirdPartyConfig := & tpmodels.TypeInput {
113- SignInAndUpFeature : tpmodels.TypeInputSignInAndUp {
114- Providers : verifiedConfig .Providers ,
110+ if thirdPartyInstance == nil {
111+ thirdPartyConfig := & tpmodels.TypeInput {
112+ SignInAndUpFeature : tpmodels.TypeInputSignInAndUp {
113+ Providers : verifiedConfig .Providers ,
114+ },
115+ Override : & tpmodels.OverrideStruct {
116+ Functions : func (_ tpmodels.RecipeInterface ) tpmodels.RecipeInterface {
117+ return recipeimplementation .MakeThirdPartyRecipeImplementation (r .RecipeImpl )
115118 },
116- Override : & tpmodels.OverrideStruct {
117- Functions : func (_ tpmodels.RecipeInterface ) tpmodels.RecipeInterface {
118- return recipeimplementation .MakeThirdPartyRecipeImplementation (r .RecipeImpl )
119- },
120- APIs : func (_ tpmodels.APIInterface ) tpmodels.APIInterface {
121- return api .GetThirdPartyIterfaceImpl (r .APIImpl )
122- },
119+ APIs : func (_ tpmodels.APIInterface ) tpmodels.APIInterface {
120+ return api .GetThirdPartyIterfaceImpl (r .APIImpl )
123121 },
124- }
125- thirdPartyRecipeinstance , err := thirdparty .MakeRecipe (recipeId , appInfo , thirdPartyConfig , & r .EmailDelivery , onSuperTokensAPIError )
126- if err != nil {
127- return Recipe {}, err
128- }
129- r .thirdPartyRecipe = & thirdPartyRecipeinstance
130- } else {
131- r .thirdPartyRecipe = thirdPartyInstance
122+ },
132123 }
124+ thirdPartyRecipeinstance , err := thirdparty .MakeRecipe (recipeId , appInfo , thirdPartyConfig , & r .EmailDelivery , onSuperTokensAPIError )
125+ if err != nil {
126+ return Recipe {}, err
127+ }
128+ r .thirdPartyRecipe = & thirdPartyRecipeinstance
129+ } else {
130+ r .thirdPartyRecipe = thirdPartyInstance
133131 }
134132
135133 return * r , nil
0 commit comments