ChangeEmailAsync "invalid token" in asp.net Core Identity

Viewed 611

I encountered this issue while developing an app and didn't find any question related to it.

I'm using asp.net Core 3.1, win 10.

1 Answers

Make the following change in "ConfirmEmailChange.cshtml.cs":

// code = Encoding.UTF8.GetString(WebEncoders.Base64UrlDecode(code)); // DELETE THIS LINE
var result = await _userManager.ChangeEmailAsync(user, email, code);

That fixes the problem.

Related