Implementing or skipping the aspnetusers hash

Hi. A new user here, actually going through the trial with the possibility to get the software and convert an already existing app. I like what I'm seeing, from the RAD point of view, since my knowledge of C# and Blazor is minimal.

I got to the point where, after login, I can cross-reference a user account number (for which I can use PhoneNumber field in the aspnetusers table) and filter through the transactions/orders table and display the records just for that user. From the get-go.
Roles and other accompanying tables are not of use in this case, but they don't bother me either.

My issue (and question) is this: I've managed to upload the usernames/emailaddresses and passwords from the current security table I have into the aspnetusers. Residing in MySQL database, in my case. If I create a new user, everything is working fine. But for the already existing users the login doesn't work because I haven't hashed the values before putting them in the PasswordHash field.
How can I do that, so those password values are hashed the way aspnetusers (and radzen/blazor) expects them? I tried MySQL workbench's MD5, SHA2 but of course that didn't work. I've heard of combinations with Salt but I don't know how to encrypt those with sql command. And what encryption keys are used. I know it'd be one time deal to convert those and then it'd be fine through the program.

Alternatively, for this program, I'm not too concerned about the security so the old non-crypted passwords are fine. How do I tell the generated radzen code (or in the .cs files) to ignore and skip the hashing? And can I do that at all?

I don't want to use the custom security method, as aspnetusers works fine without this major issue.
And, for some reason, I couldn't get the custom security going on from the project sample posted on github. Again, it is probably my very limited knowledge of this thematic.

Thanks in advance for any answers. And thanks for reading this long and convoluted inquiry :slight_smile:

Sime

Hi @Sime_Atanasov,

Three years ago I've made a post on how to migrate users from old ASP.NET identity to ASP.NET Core Identity however in this case users should reset their passwords:

Maybe this thread will be help also in your case:

Thanks Vladimir - I appreciate it! I'll take a look at it and see if I can figure it out.
PS I've noticed that most of the old passwords (that need to be migrated or reset) don't go by the aspnetusers rules, i.e. they do not have the combo of small, capital letters and a special character. Not sure if that will be a problem down the road.