Feature/Auth: implement user authentication #3
@@ -22,7 +22,10 @@ public class AuthController : ControllerBase {
|
||||
public async Task<ActionResult> Register(RegisterDto dto) {
|
||||
var user = new User {
|
||||
Name = dto.Username,
|
||||
PasswordHash = BCrypt.Net.BCrypt.HashPassword(dto.Password) // TODO: hashing stage in client
|
||||
Email = "dummy@goofy.xyz",
|
||||
PasswordHash = BCrypt.Net.BCrypt.HashPassword(dto.Password), // TODO: secondary hashing stage in client
|
||||
Role = "admin (FOR NOW !!)",
|
||||
CreatedAt = DateTime.UtcNow // yeah why not utc
|
||||
};
|
||||
|
||||
var newUser = await users_.Create(user);
|
||||
|
||||
Reference in New Issue
Block a user