Skip to content

Commit

Permalink
small changes
Browse files Browse the repository at this point in the history
  • Loading branch information
rishabhpoddar committed Apr 9, 2024
1 parent edcc793 commit bc07f5b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion recipe/dashboard/api/userdetails/userPasswordPut.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func UserPasswordPut(apiInterface dashboardmodels.APIInterface, tenantId string,
}

if recipeToUse == "none" {
// This means that neither emailpassword or thirdpartyemailpassword is initialised
// This means that emailpassword is not init
return userPasswordPutResponse{}, errors.New("Should never come here")
}

Expand Down
6 changes: 2 additions & 4 deletions recipe/dashboard/api/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,10 @@ func IsValidRecipeId(recipeId string) bool {
/*
This function tries to fetch a user for the given user id and recipe id. The input recipe id
should be one of the primary recipes (emailpassword, thirdparty, passwordless) but the returned
recipe will be the exact recipe that matched for the user (including thirdpartyemailpassword and
thirdpartypasswordless).
recipe will be the exact recipe that matched for the user
When fetching a user we need to check for multiple recipes per input recipe id, for example a user
created using email and password could be present for the EmailPassword recipe and the ThirdPartyEmailPassword
recipe so we need to check for both.
created using email and password could be present for the EmailPassword recipe so we need to check for both.
If this function returns an empty user struct, it should be treated as if the user does not exist
*/
Expand Down

0 comments on commit bc07f5b

Please sign in to comment.