Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/email change improvements #78

Closed

Conversation

icecream78
Copy link
Contributor

According to issue #60 I've implemented logic for verification email changing.
Previous logic for email change verification was moved to common GET /verify handler that now can handle new type of requests - email_change.

@icecream78
Copy link
Contributor Author

@awalias check it please=)

Copy link
Member

@kangmingtay kangmingtay left a comment

Choose a reason for hiding this comment

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

Hi @icecream78, thanks so much for working on this! Sorry for the delay in the review, we were really busy with other issues in the pipeline. This PR looks mostly good to me except for the url being sent in the email change confirmation email. We need to make sure it points to the /verify endpoint to complete the change email flow.

Comment on lines +268 to +270
if params.Token != user.EmailChangeToken {
return unauthorizedError("Email Change Token didn't match token on file")
}
Copy link
Member

Choose a reason for hiding this comment

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

We don't have to do this check here because we already do a models.FindUserByEmailChangeToken in line 252. If the token is invalid (doesn't match the email change token), then line 252 would return a models.IsNotFoundError

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants