I have the following code that ensures the Token lifetime span for email verification tokens expire after 14 days :-
if (Startup.DataProtectionProvider != null)
{
IDataProtector dataProtector = Startup.DataProtectionProvider.Create("ASP.NET Identity");
this.UserTokenProvider = new DataProtectorTokenProvider<IdentityUser, Guid>(dataProtector)
{
TokenLifespan = TimeSpan.FromDays(14)
};
}
In a different area of my app, I'm using mobile phone number tokens by calling the GenerateChangePhoneNumberTokenAsync(userId, phoneNumber) method of the ASP.Identity ApplicationUserManager.
The problem is that the mobile tokens are expiring after 15 minutes.
How do i change the lifetime of the mobile tokens?