I\'m trying to confirm an account but I\'m getting \"invalid token.\" error.
Here\'s what I\'m trying:
var code = await UserManager.GenerateEmailConf
In case these solutions aren't working for you - I ran into the problem in a Asp.Net Core project because I had added the following configuration in Startup.cs:
services.Configure(options =>
{
options.LowercaseUrls = true;
options.LowercaseQueryStrings = true;
});
The second setting was causing the confirmation code to get converted to lowercase, which caused validation to fail. Ideally I'd like to keep query string parameters lower case, and not alter the query string values, but I'm not finding a way to do that, so I just removed the query string setting:
services.Configure(options =>
{
options.LowercaseUrls = true;
});