Identity Framework test if confirm email token is expired
Is it possible to test whether a confirm email token is expired using Identity Framework's UserManager ? No matter what the error is, from the following: var result = await UserManager.ConfirmEmailAsync(userId, code); I get a generic "Invalid Token" error. I found a way to parse the token for the date issued, which you can then check to see if is within the allowed timespan (default of 24hours if not specified). Identity.cs ApplicationUserManager public IDataProtector Protector { get; set; } public TimeSpan TokenLifespan { get; set; } ApplicationUserManager Create() // Explicitly set token