I'm trying to implement a registration prozess for my webapp. The problem is that the generated "userManager.GenerateEmailConfirmationTokenAsync(user.Id);
" code is to long. Is there any possibility for generating a short one like this: "qwert12345asdfg6"
My UserTokenProvider is implemented like this:
var dataProtectionProvider = new DpapiDataProtectionProvider("IdentityServer3");
if (dataProtectionProvider != null)
{
UserTokenProvider = new DataProtectorTokenProvider<User>(dataProtectionProvider.Create("ASP.NET Identity"))
{
TokenLifespan = TimeSpan.FromHours(3)
};
}
Do you have an idea what do I need to do?
答案 0 :(得分:0)
ASP.NET Identity使用UserTokenProvider
的{{1}}生成并验证令牌。
您可以实现自己的UserManager
或扩展默认值,而不是设置为UserManager.UserTokenProvider。