
Learn to implement authentication and authorization in a Node.js Express app with email verification options, captcha protection, token-based authentication, multi-factor authentication, and rule-based access control.
Prepare your development environment for Node.js Express security by setting up a multi-OS workstation (Windows, Linux, macOS), installing MySQL for database management, and ensuring reliable internet access for project work.
Design access controls and set up the project, then implement email verification with token and captcha to secure authentication and authorization workflows in Node.js Express.
Design a MySQL user registration schema that includes email and mobile fields with confirmations, a password and creation date, two-factor readiness, and a linked profile, while supporting multiple user roles.
Set up a Node.js express project, install dependencies, configure Postgres, generate data models, and connect them to the database to support authentication and authorization workflows.
Register users by validating input, preventing duplicate usernames and emails, and performing a database transaction with commit or rollback to create a user profile.
Learn to implement user registration with email confirmation in a Node.js Express app, configure SMTP for delivery, manage confirmation tokens, and apply SSL certificates for secure verification.
Implement a resend email confirmation token workflow: validate email, generate a token, compose and send a confirmation email, and handle success or failure in the backend.
Learn how to implement Google reCAPTCHA in user registration using Node.js and Express, configure keys, integrate the library, and verify user responses to enhance security.
Implement authentication and authorization in Node.js Express, including email confirmation, remember me, password reset, and multifactor authentication. Apply rule-based access control to enforce authorization and protect user accounts.
Understand how to design a user authentication database by organizing email and profile data, implementing rules within the system, and ensuring scalable, secure data structures.
Implement username and password authentication with a login form, database-verified hashing, and a login token; enable remember me and protect my profile using passport middleware.
Enable email confirmation as part of the authentication flow, ensuring users cannot log in until their email is verified, with resend options and server-side checks.
Learn to implement remember me in an Express login by setting a remember me cookie with a token, enabling automatic re-authentication after closing the browser while using Passport for authentication.
Implement a password change flow in the user profile, requiring current password and re-entry of the new password, with authorization checks and a logout and login after update.
Implement a simple forgot username flow in node.js express: present an email form, verify the email exists in records, and send the username to the user’s email.
Learn to implement a secure forgot and reset password flow in node.js express, sending a tokenized reset link, validating tokens, and updating user passwords.
Enable multi-factor authentication by presenting a user-controlled setup form, activating a second factor via email, and validating tokens during login to secure access.
Implement a login lock after wrong password attempts, using a table to track failures, set a minute-based lock, and verify unlocking after the wait period.
Explore role-based access control in a Node.js Express app by modeling roles like admin and miniature, mapping user rules to resources, and enforcing authorization with token checks.
Implement login with Twitter using passport-twitter, configure API key and secret, set callback, and enable social media login to authenticate users and retrieve profile data.
Learn to implement login with google in a node.js express app using passport google strategy, including obtaining client id and secret from the google console and handling profile with redirects.
Learn to implement login with Facebook by integrating the passport-facebook library, configuring app id and secret, and handling the callback to sign in users.
Integrate the app with GitHub by creating a GitHub app, copying the client ID and secret, and wiring a login flow with Passport.js, including a callback and GitHub profile data.
Learn to integrate a node.js express app with linkedin for authentication by creating a linkedin app, copying the client id and secret, enabling the callback, and wiring passport-linkedin.
This bootcamp has a goal to introduce web application development with Node.JS and Express. For database, we use MySQL to store the data. The bootcamp focuses on security and authorization. The following is a list of highlight topics:
Use Registration
Authentication
Authorization
We start to learn about user registration. We create a registration form with Node.js and Express. We use Handlebar for Express Template View. User email will be confirmed in our application. To prevent from bots, we implement CAPTCHA on registration. We use reCaptcha from Google.
Database Design for User Registration: MySQL
Setting up project
User Registration
User Registration with Email Confirmation
Resending Email Confirmation Token
Implementing CAPTCHA on User Registration
Signing with Social Media Providers: Twitter, Google, Facebook, GitHub and LinkedIn
Next topic is authentication. We will challenge users to verify user account. We use username and password for authentication. we can enable for user authentication with confirmed email. Each user email that doesn't be confirmed yet will not access web resources. We also implement multi-factor authentication. We send codes to user email to verify user authentication.
Last, we implement Role-based authorization. We define user roles and then assign roles to each user. We will implement authorization with Express middleware.
Pre-requisite
Having knowledge of web development such as HTML5, CSS and JavaScript
Having knowledge of Node.js development
Computer with installed Windows , Linux or macOS
All materials are delivered with step-by-step approach. See you on my course.
Update 1: 24 October 2021
Add new contents: Login with Social Media: Twitter, Facebook, Google, GitHub and LinkedIn