ASP.NET Core Identity invalid token on confirmation email

前端 未结 7 1528
没有蜡笔的小新
没有蜡笔的小新 2021-01-01 12:11

This is a very similar question to this aspnet identity invalid token on confirmation email but the solutions are not valid because I am using the new ASP.NET Core 1.0 that

7条回答
  •  一个人的身影
    2021-01-01 12:48

    I have tried the answers above, but this guide has helped me. Basically, you would need to encode the code, otherwise, you would encounter some weird bugs. To summarise you would need to do this:

    string code = HttpUtility.UrlEncode(UserManager.GenerateEmailConfirmationToken(userID));
    

    After this, if it is applicable to you, decode code:

    string decoded = HttpUtility.UrlDecode(code)
    

提交回复
热议问题