- Add UserDto.cs in App= (Username, Password)
-
Add User.cs in App = (Username, PasswordHash, PasswordSalt)
-
Add Api Controller-Empty (AuthController.cs) into Controller=
(Create a method for CreatePasswordHash() method ) (Create a method for VerifyPasswordHash() method ) (Create a method to register user/ [HttpPost("register")]) (Create a method to login user/ [HttpPost("login")] (Create a method for CreateToken() method )
-
Add a new section to AppSettings.json= (Add "AppSettings"{Token: ...............}.)
-
Add a constructor (public AuthController{IConfiguration ...}) into AuthController.cs (Continue to create a method for CreateToken() method )
-
Controll jwt token at jwt.io internet side