I'm looking to create users for my MVC web application through a WCF webservice. In previous identity versions I created a record for both the membership and users table which worked.
Now there's only the aspnetUsers table that stores user profiles. I have tried creating a new record in this table but with no success. Record gets created but I cannot login with that account. How do I hash my password? Where do I put the salt? There seems to be no field specified in the table to define your salt.
This the query that i'm trying to use:
INSERT INTO AspNetUsers(Id, Email, EmailConfirmed, PassWordhash, SecurityStamp,PhoneNumber,PhoneNumberConfirmed, TwoFactorEnabled,LockoutEnabled,AccessFailedCount,UserName) " + "
VALUES(@Id,
@Email,
@EmailConfirmed,
@PassWordhash,
@SecurityStamp,
@PhoneNumber,
@PhoneNumberConfirmed,
@TwoFactorEnabled,
@LockoutEnabled,
@AccessFailedCount,
@UserName) command.Parameters.Add(NEW SqlParameter("@Email", emailAddress));
command.Parameters.Add(NEW SqlParameter("@EmailConfirmed", FALSE));
//TODO hash + securitystamp?
command.Parameters.Add(NEW SqlParameter("@PassWordhash", hashedPassword));
command.Parameters.Add(NEW SqlParameter("@SecurityStamp", FALSE));
command.Parameters.Add(NEW SqlParameter("@PhoneNumber", "093277604"));
command.Parameters.Add(NEW SqlParameter("@PhoneNumberConfirmed", FALSE));
command.Parameters.Add(NEW SqlParameter("@TwoFactorEnabled", FALSE));
command.Parameters.Add(NEW SqlParameter("@LockoutEnabled", TRUE));
command.Parameters.Add(NEW SqlParameter("@AccessFailedCount", "0"));
Currently adding this directly through the database because I'm not aware of any other way? There used to be stored procedures to do this but now there's none.
I'm using the crypto library to hash my password but that clearly does not work.