From b649c69a50f48cee89a8496c03696e364ea45226 Mon Sep 17 00:00:00 2001 From: rishabhpoddar Date: Wed, 22 Nov 2023 22:09:37 +0530 Subject: [PATCH] fixes tpep recipe --- recipe/thirdpartyemailpassword/main.go | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/recipe/thirdpartyemailpassword/main.go b/recipe/thirdpartyemailpassword/main.go index 52abbb0f..c297bf89 100644 --- a/recipe/thirdpartyemailpassword/main.go +++ b/recipe/thirdpartyemailpassword/main.go @@ -173,14 +173,22 @@ func CreateResetPasswordLink(tenantId string, userID string, userContext ...supe return epmodels.CreateResetPasswordLinkResponse{}, err } + link, err := api.GetPasswordResetLink( + instance.RecipeModule.GetAppInfo(), + instance.RecipeModule.GetRecipeID(), + tokenResponse.OK.Token, + tenantId, + supertokens.GetRequestFromUserContext(userContext[0]), + userContext[0], + ) + + if err != nil { + return epmodels.CreateResetPasswordLinkResponse{}, err + } + return epmodels.CreateResetPasswordLinkResponse{ OK: &struct{ Link string }{ - Link: api.GetPasswordResetLink( - instance.RecipeModule.GetAppInfo(), - instance.RecipeModule.GetRecipeID(), - tokenResponse.OK.Token, - tenantId, - ), + Link: link, }, }, nil }