✅ Hashing password - ASP.NET Core Identity PasswordHasher
Hi guys, I'm trying to use ASP.NET Core Identity PasswordHasher. I followed this documentation : https://andrewlock.net/exploring-the-asp-net-core-identity-passwordhasher/ but I have errors of conversion (string to User).
First, what's the best way to hash password ?
Then, what documentation should your recommend to learn to use it ?
Thank you!
Andrew Lock | .NET Escapades
Exploring the ASP.NET Core Identity PasswordHasher
In this post I take a look at the PasswordHasher<> implementation from the ASP.NET Core Identity framework, and how it supports multiple hashing algorithms.
11 Replies
What's the code and what are the errors?
Unknown User•11mo ago
Message Not Public
Sign In & Join Server To View
Thank's, but I don't find any clear and complete ressource on Identity and hashing password, i'ts directly Microsoft that gives the link of Andrew Lock's doc. Do you know any ?
Unknown User•11mo ago
Message Not Public
Sign In & Join Server To View
I work with the 8.0 version, is taht ok ? Thank you 🙂
Unknown User•11mo ago
Message Not Public
Sign In & Join Server To View
Thank you 🙂 I often can't find what I want with Microsoft's documentation... Like, here, I have some infos about Identity methods but no examples for how I have to use them.
Do I have to use directly in my model ? Or in the controller ? I'm lost ^^
I tried to use this code https://github.com/dotnet/aspnetcore/blob/main/src/Identity/Extensions.Core/src/PasswordHasher.cs And I have errors :
-"no definition in Resources for InvalidPasswordHasherIterationCount",
-"no definition in Resources for InvalidPasswordHasherCompatibilityMode"...
Unknown User•11mo ago
Message Not Public
Sign In & Join Server To View
Hi @TeBeCo , I still have trouble using Identity, if you want to take a look... Here my post request :
I have 500 error from the frontend, I never enter the post request. And I have this issue:
I can't implement correctly the dependance in the Program.cs
Here my implementation on the Program.cs :
I installed 2 more NuGets : Microsoft.AspNetCore.Identity.EntityFrameworkCore and Microsoft.AspNetCore.Identity.UI
Unknown User•11mo ago
Message Not Public
Sign In & Join Server To View
Thank you !! I don't get how to use Identity reading the code source of it, I'm a begginer, and C# is hard without the proper documentation 😢 I don't want to use it manually. I'm trying to use the whole framework, but I'm having a hard time!
Here what I'm trying to do. I would like to hash the passwords of my users, when users create an account. And then to use it for the authentication part of the application.
I'm considering working with BCrypt instead of Identity