Skip to content

Commit

Permalink
fixes tpep recipe
Browse files Browse the repository at this point in the history
  • Loading branch information
rishabhpoddar committed Nov 22, 2023
1 parent 1bd3128 commit b649c69
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions recipe/thirdpartyemailpassword/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit b649c69

Please sign in to comment.