When I try to reset a password, I'm getting the "Invalid Token"
Token before being sent: cBcZbiN8LO9+aIVMbegaj1k5IYrJ3fBOKJ/WSH0NZZUgguSgWOFANoVOMp8y5b/481AP/mpnusV1YlmXQ1zFQmi4S/7xYMtRn3IeSIviEWmuxwPF8O41Y1pFQ1tF8GAaw5D4/Y9+olZvII/kh5W8RGn4JT9wrOz/qwtdnYXbYxmjp4i20mLzXWqs9ewVUKIo8FZ+7mXP+sKYKk+e754tLw==
Token been received: cbczbin8lo9+aivmbegaj1k5iyrj3fbokj/wsh0nzzuggusgwofanovomp8y5b/481ap/mpnusv1ylmxq1zfqmi4s/7xymtrn3iesiviewmuxwpf8o41y1pfq1tf8gaaw5d4/y9+olzvii/kh5w8rgn4jt9wroz/qwtdnyxbyxmjp4i20mlzxwqs9ewvukio8fz+7mxp+skykk+e754tlw==
As you can see, the only difference is that for some reason, there are Upper case letters when its been generated and they are been changed to lower case, probably caused by the HttpUtility.UrlEncode / HttpUtility.UrlDencode actions?
Forgot Password:
string code = await UserManager.GeneratePasswordResetTokenAsync(user.Id);
var callbackUrl = Url.Action("ResetPassword", "Account", new { userId = user.Id, code = HttpUtility.UrlEncode(code) }, protocol: Request.Url.Scheme);
await UserManager.SendEmailAsync(user.Id, "Reset Password", string.Format("Please reset your password by clicking <a href='{0}'>here</a>", callbackUrl));
Reset Password
var code = HttpUtility.UrlDecode(model.Code);
var result = await UserManager.ResetPasswordAsync(user.Id, code, model.Password);
Any idea what is causing this?
Thanks