UserManager.GeneratePasswordResetTokenAsync returning token but not storing it in UserTable

Rory Aherne asked on March 1, 2024 15:48


following the documentation here, I am trying to implement a pw reset form but we want to use our own emails instead of the kentico template so I leave out the email part.

string token = await userManager.GeneratePasswordResetTokenAsync(user);
returns a token (eg "CfDJ8IAL3MVij4xKuKZxLzKiQ1fdSDVAQPGViq211NI+ErrllZchQ5/TCowxAMBp2kI5p5K4RVOi9GUR9Y5/mDKkMPHHlbJ3T+wdrmVAcjpBSplRF1gJjIwJHzTc0utEA5UZoGUopoZ9kTgHnLH3tIeQmss=")

But this doesn't get stored in the [CMS_UserSettings].[UserPasswordRequestHash] column and CMS_User.SecurityStamp is also empty and so the subsequent validation of the hash via UserManager.VerifyUserTokenAsync fails.

I've done everything exactly as according to the documentation except for sending the email.

I'm on v13.0.124

Correct Answer

Rory Aherne answered on March 5, 2024 12:26

I have forms in a separate assembly and didn't have the cmssalt in my appsettings.json

0 votesVote for this answer Unmark Correct answer

   Please, sign in to be able to submit a new answer.