How to implement a TokenProvider in ASP.NET Identity 1.1 nightly build?

后端 未结 4 1303
北海茫月
北海茫月 2021-02-06 06:49

I\'m trying to implement password reset functionality with nightly build of ASP.NET Identity 1.1. There is a UserManager.GetPasswordResetToken method, but it throws an exception

4条回答
  •  暖寄归人
    2021-02-06 07:02

    If someone looking for solution under AspNet.Identity 2.0 beta1 version.

    Only this need to be modified.

    UserManager.UserTokenProvider = new DataProtectorTokenProvider
    (provider.Create("UserToken")) 
    as IUserTokenProvider;
    

    PasswordResetTokens and UserConfirmationTokens is merged into UserTokenProvider property and token provider class is also modified.

提交回复
热议问题