Changing Email in .net core identity
# help-with-other
h
Not an umbraco problem 🙂 Has anyone used the changemail code with .net core? I have been struggling for days to get this to work, but no matter what I do I always get an Invalid token result. I even tried it without sending any emails but still get an invalid token response (I'm using .net core 7) code example:
Copy code
cs
            var token = await _userManager.GenerateEmailConfirmationTokenAsync(user);
            var result = await _userManager.ChangeEmailAsync(user,model.NewEmail, token);
Any ideas?
Doh! I'm being a total numpty 🤣 was using the wrong token generation function!