I'm trying to generate a password reset token using the following:
Dim resetToken As String
Dim options As New IdentityFactoryOptions(Of UserManager)
manager.UserTokenProvider = New DataProtectorTokenProvider(Of ApplicationUser)(options.DataProtectionProvider.Create("PasswordReset"))
resetToken = manager.GeneratePasswordResetToken(user.Id)
I receive an error:
Object reference not set to an instance of an object.
on the highlighted piece of code. I simply cannot figure out why as the examples I've researched are identical.