I try the new ASP.NET identity. I have some more complex scenario than in examples. I create an user account without setting password and send the confirmation email. During the conformation user is setting password and confirming email. Unfortunately
I'm getting the "Invalid token" error. Here is my code:
[HttpPost]
[ValidateAntiForgeryToken]
public async Task<ActionResult> Create(CreateViewModel model)
{
if (ModelState.IsValid)
{
var user = new AppUser { UserName = model.Email, Email = model.Email, FirstName = model.Name, LastName = model.Surname };
try
{
await userRepository.InsertAndSubmitAsync(user);
var userManager = HttpContext.GetOwinContext().GetUserManager<AppUserManager>();
var code = await userManager.GenerateEmailConfirmationT ...
Go to the complete details ...