In this video, we turn our focus on authentication and authorization in NestJS. We will start by creating a user module and leveraging the power of database triggers to hash the user password. This is the first episode of a series on authentication and authorization in NestJS, so stay tuned for more!
Here are some additional details about the video:
We will create a user module with a controller, service, DTOs, and an entity.
We will use NestJS's built-in resource generator to create the module and its components.
We will add a password column to the user entity and use a before insert trigger to hash the password before it is saved to the database.
We will use the bcrypt package to hash and compare passwords.
We will create a create user DTO with validation rules for the user's first name, last name, email, avatar URL, and password.
We will implement the create function in the user service to create and save a new user.
We will test the create user endpoint using Insomnia.
This video is for developers who are familiar with NestJS and want to learn more about authentication and authorization.
GitHub Repo(Please Give It a Star⭐ on GitHub): https://github.com/vahid-nejad/nestjs