Skip to content

Conversation

bojeil-google
Copy link
Contributor

Catch EMAIL_NOT_FOUND when /accounts:sendOobCode is called for password reset on a user that does not exist.

Copy link
Contributor

@hiranya911 hiranya911 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Please change the target branch to dev. And lets also add a test case.

@@ -468,6 +469,11 @@ func IsEmailAlreadyExists(err error) bool {
return hasAuthErrorCode(err, emailAlreadyExists)
}

// IsEmailNotFound checks if the given error was due to the user record corresponding to the email not being found.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets also add a test case at

func TestGetNonExistingUser(t *testing.T) {

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a test to email_action_links_test.go as that is where all the PasswordResetLinkWithSettings tests are located.

@bojeil-google bojeil-google changed the base branch from master to dev May 3, 2021 22:11
@google-cla
Copy link

google-cla bot commented May 4, 2021

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and then comment @googlebot I fixed it.. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

@google-cla
Copy link

google-cla bot commented May 4, 2021

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and then comment @googlebot I fixed it.. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

@bojeil-google
Copy link
Contributor Author

Looks good. Please change the target branch to dev. And lets also add a test case.

Done

@hiranya911 hiranya911 assigned egilmorez and unassigned bojeil-google May 4, 2021
Copy link

@egilmorez egilmorez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG, some nits we can fix here or in a doc fixit later.

@bojeil-google bojeil-google assigned hiranya911 and unassigned egilmorez May 4, 2021
@hiranya911 hiranya911 merged commit cdb46be into dev May 4, 2021
@hiranya911 hiranya911 deleted the email-not-found branch May 4, 2021 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants