Email Token Expiring After 15 mins - Asp Identity 2.0 API

后端 未结 1 1072
执笔经年
执笔经年 2020-12-29 05:25

I\'m facing a strange issue in Asp Dot Net Identity API 2.0 API.

When an user signs up, I send a confirmation email to the user. And if the user confirms his / her a

相关标签:
1条回答
  • 2020-12-29 06:00

    Change the code in the Create method(App_Start\IdentityConfig.cs file).

    if (dataProtectionProvider != null)
     {
        manager.UserTokenProvider =
           new DataProtectorTokenProvider<ApplicationUser>
              (dataProtectionProvider.Create("ASP.NET Identity"))
              {                    
                 TokenLifespan = TimeSpan.FromHours(3)
              };
     }
    

    source: http://www.asp.net/identity/overview/features-api/account-confirmation-and-password-recovery-with-aspnet-identity

    0 讨论(0)
提交回复
热议问题