Asp.NET Identity 2 giving “Invalid Token” error

前端 未结 21 1929
情话喂你
情话喂你 2020-11-27 03:04

I\'m using Asp.Net-Identity-2 and I\'m trying to verify email verification code using the below method. But I am getting an \"Invalid Token\"

21条回答
  •  悲&欢浪女
    2020-11-27 03:51

    string code = _userManager.GeneratePasswordResetToken(user.Id);
    
                    code = HttpUtility.UrlEncode(code);
    

    //send rest email


    do not decode the code

    var result = await _userManager.ResetPasswordAsync(user.Id, model.Code, model.Password); 
    

提交回复
热议问题