
Build a production-ready authentication system with React, Next.js, and TypeScript, featuring robust signup validation, password strength, email verification, password reset, and multi-provider sign-in.
Create a Next.js app using npm, yarn, or pnpm, enable TypeScript, choose the source or app directory, and run the dev server to view at localhost:3000.
Set up tailwind css in a next js typescript project by installing tailwind css, creating config files, and applying tailwind classes to components.
Set up a MongoDB Atlas cluster, choose the free shared plan, create a user, authorize IPs, and retrieve the connection URL to connect your app with Mongoose or MongoDB Compass.
Connect a TypeScript app to MongoDB with Mongoose, validating the environment URL and using a cached global connection to prevent duplicate connections.
Set up next auth with react, next js, and typescript, authenticate using github, test login flows, and manage sessions with a session provider and server-side props.
Set up and test the Google provider for authentication using next-auth, configuring Google client id and secret, OAuth consent, and sign-in and sign-out flows.
Set up the Discord provider by importing it, configuring the application id and client secret from the Discord developer portal, and adding development and production redirects for sign in.
Set up the Twitter provider for authentication by importing the provider, adding secrets, and enabling read access with email; configure a Twitter developer app and callback URL.
Deploy the application to production mode and push changes to a GitHub repository. Configure environment variables and secrets, test production sign-in with Google, GitHub, Discord, and Twitter, and adjust redirects.
Set up the Facebook login provider by creating a Facebook app, configuring web login, and adding production redirect URLs, app id and secret in environment variables, then test sign-in.
Learn how to set up the Auth0 provider for a React/Next.js app, configure secrets and issuer, define local and production callback URLs, and test sign-in flows with Google.
Register signed-in users in a database using the MongoDB adapter during provider sign-in, demonstrating local and production setups and confirming user and account creation in MongoDB Atlas.
Explore session strategies by comparing database-stored tokens with json web token approaches, showing how cookies, encryption, and next auth tokens secure sign-in workflows.
Learn how callbacks control sign-in by extracting the provider from accounts, storing it in the JWT, and exposing it in the session with TypeScript augmentation.
Learn to style and lay out the home page for an authentication app using React, Next.js and TypeScript, including a centered user card, profile image, name, email, and sign-out.
Learn to style the home page using flex layouts, margins, borders, and responsive tweaks, integrate react icons for social links, and surface the source code with accessible links.
Learn to protect routes in Next.js using middleware, handle authentication with sessions and redirects, and guard admin and protected pages on the server side.
Learn to set up an authentication page in a React Next.js TypeScript project, build a sign up form with custom inputs, and implement a sign in toggle.
Finish building a styled input inside a React form, with a div wrapper, relative positioning, border and shadow, and a placeholder, plus React form validation.
Implement robust form validation with React Hook Form and TypeScript by registering inputs, handling submit with useForm, watching values, and displaying errors in real time.
Learn to implement zod-based validation in a react form using a zod resolver, defining a first name schema with min 2, max 32, and letters-only regex.
Create email and phone inputs with validation in a react next typescript authentication flow, using icons, focus management, and a validator package.
Implement password and confirm password inputs with min and max length validation, ensure password matches using refine, and test real-time error messages, plus consider a password strength check.
Learn to implement password strength validation in React by integrating a scoring tool, tracking the score with useState, watching password changes, and rendering a five-segment strength indicator with color feedback.
Implement and validate a terms and conditions checkbox in a React TypeScript app, showing a red error when unchecked and linking to terms and privacy policy.
Refactor a register form by replacing a submit button with a reusable slide button component in React and TypeScript, wiring type, text, icon, and disabled state.
Implement show and hide password in signup forms with React useState, toggling password and confirm password inputs between password and text, using icons and accessible click handlers.
Learn to build a reusable background component with per-page images and responsive styling, then set up toastify for success and error notifications with a translation helper for form errors.
Implement a backend sign-up flow that validates all fields, checks for existing users, decrypts the password, creates a user model, and stores the new user in the database.
Implement loading indicators with a subtle loader during form submission, configure React Spinners, and reset the sign-up form on success while handling errors and optional redirects.
Create and customize an email template using a free online base, edit for the user name and activation link, and use curly brace placeholders for dynamic data.
Set up smtp accounts using elastic email and Gmail smtp api, configuring host, port, username, password, and mailing email in your env file.
Learn to implement a sendmail function with nodemailer and handlebars in a TypeScript environment. Create a transport from env vars, compile templates with handlebars, verify connection, and send templated emails.
Learn to generate an activation token with json web token, send an activation email with a secure link, and activate accounts by updating the email verified flag in the database.
This lecture shows activating user accounts with React, Next.js, and TypeScript by reading a URL token, validating it on the server, updating the database, and displaying success or error messages.
Sign in with email and password using a credentials provider, verify in database, and switch between sign in and sign up forms with a url tab that updates background image.
Implement sign-in with email and password, handle errors with toasts, and use a csrf token plus a callback URL to return users to their original page.
Add and render authentication providers for sign in and sign up using NextAuth in a React Next.js TypeScript app, building a social button and handling provider workflows.
Create a dedicated forgot password page by adapting the login form into a forgot form, add a /forgot route, and implement an email-only form with validation.
Define the forgot password backend api, implement the submit function with error handling, verify the user by email, issue a reset token, and email a reset link.
Build a frontend reset password flow in a React/Next.js TypeScript app, reuse a reset form with password and confirm password, and pass the url token via server side props.
Build and test a reset password API endpoint by extracting token and new password, verifying the reset token, locating the user, hashing and updating the password, and validating sign-in.
Prepare and test a full authentication app for deployment on vercel by building locally, fixing issues, and pushing to GitHub, then verify production sign up, email verification, and login flows.
This is simply the best course on the internet if you want to build and deploy the best authentication system that you can take and use in all of your projects , and i am talking from login, register, forgot and reset password, send emails, from validation, protected routes and more.
We will use Next auth mixed with typescript to provide strong typed code while benefiting from Next js server side capabilities which makes this build really hard to compete with from :
-we will use tailwind css for styling our application.
- Strong form validation with react-hook-form and zod.
-Strong login system using next auth secure sessions.
-Login with credentials, google, facebook, twitter, github, discord, auth0...
-Strong register system with validation in frontend and backend.
-Manipulating next auth callbacks for our advantage.
-Sending emails using nodemailer and smtp services including gmail.
-Handling tokens secretly with emails.
-Writing high quality production ready code.
-Learn how work with typescript even as a beginner or someone who never used it.
-Setup Mongodb cluster and Mongodb connection from our application with typescript.
-Add the users to our database where we handle the accounts while we handle the tokens in cookies using json web tokens.
-working with next js api.
-learning about handlebars and use it to replace in our html files.
-Deployment to vercel.