
Learn how to enable CORS in NestJS to allow the frontend on port 3000 to receive cookies and refresh tokens by setting allowed origins, credentials, and a global API prefix.
learn to implement a refresh token flow in NestJS and React by creating a post /refresh endpoint, reading the token from cookies, validating it, and issuing a new access token.
Learn to implement login by simplifying the form to email and password, navigate to home on success, and handle tokens stored in cookies with authorization header for subsequent requests.
Create a Redux Toolkit slice to manage authentication with an isAuthenticated boolean, dispatch actions, and connect useDispatch and useSelector to reflect login status in the UI.
Add forgot password functionality to the authentication flow by creating a forgot component, handling email input, posting to the forgot endpoint, and notifying users with success or error messages.
Implement two factor authentication by adding a dfa_secret to the user entity, generating a speakeasy secret for a QR code, and returning tokens after validation.
Design and implement an authenticator form in a React-based login flow, handling login data, transitioning to an authenticator input for a six-digit code, and validating via TSX state and props.
Welcome to this course where you will learn everything you need to know to secure your React and NestJS app.
In NestJS you will learn:
Use NestJS with Typescript
Use TypeORM with MySQL
Use Access & Refresh Tokens
Use HttpOnly Cookies
Send Emails
Login using 2 Factor Authentication (2FA) with Google Authenticator
Social Authentication using your Google Account
In React you will learn:
Use Typescript
Use React Hooks
Use Redux Toolikt
Create QRCodes
Social Authentication using your Google Account
If these are what you are looking for then this course is for you.
I'm a FullStack Developer with 10+ years of experience. I'm obsessed with clean code and I try my best that my courses have the cleanest code possible.
My teaching style is very straightforward, I will not waste too much time explaining all the ways you can create something or other unnecessary information to increase the length of my lectures. If you want to learn things rapidly then this course is for you.
I also update my courses regularly over time because I don't want them to get outdated. So you can expect more content over time from just one course with better video and audio quality.
If you have any coding problems I will offer my support within 12 hours when you post the question. I'm very active when trying to help my students.
So what are you waiting for, give this course a try and you won't get disappointed.