You must Sign In to post a response.
  • Category: ASP.Net MVC

    Generate Reset token for password reset with time lifespan

    I have a target to achive send reset token with a time life span

    MVC application forget password by sending token with valid time,if time lapsed password will get expired how to get it done with the MVC 4 please guide me to achive it

    thanks in advance please help me out.

  • #768234

    This is basically depends on the version Entity Framework for token you have implemented.
    In version 2.0 we cant change the expiration which was default expiration is 1 days I guess.
    For version 3.0 we can able to change the expiration date I feel.


  • #768264
    ASP.NET Identity reset tokens based on existing user properties IUserTokenProvider , DataProtectorTokenProvider which is found in the Microsoft.AspNet.Identity.Owin package. Code snippet for IIdentityMessageService interface
    public class ApplicationUser : IdentityUser
    public async Task<ClaimsIdentity> GenerateUserIdentityAsync(
    UserManager<ApplicationUser> manager)

    var userIdentity = await manager.CreateIdentityAsync(this,
    return userIdentity;

    Useful reference to Password recovery/reset code snippet :

  • Sign In to post your comments