Building Node.js Authentication from Scratch

preview_player
Показать описание


My Gears

Disclaimer: All the links above are affiliate links.

Social Links

Video Titles
Authentication in NodeJS

Tags
#nodejs #authentication #javascript #expressjs #mongodb #mernstack #developer #api #https #server #javascriptinhindi #webdevelopment #webapp #realtimeapp #serverside #nonblockingio #tech
Рекомендации по теме
Комментарии
Автор

This is the best NodeJS series ever made.

iamakashkumarram
Автор

Thankyou so much for the wonderful playlist.

kanikamehrotra
Автор

Enjoyed the entire video! Lot of learning! Thank you :)

varmapurushotham
Автор

Thanks a lot for availing this series for free, we know it takes hell amount of your time.
Thanks mate.

AkshaySharma-bgoj
Автор

when i saw this playlist for first time i was frustrated but now i am able to grasp the concepts

VarunSharma-xdxd
Автор

Thank you sir i don't know about how to find data in other collection by user ID but after watching this video i am clear now...

ankit
Автор

Bohot acha sa samjatha ho.
Make more projects in Nodejs/Expressjs.
Bohot Shukriya

iUmerFarooq
Автор

🎯 Key Takeaways for quick navigation:

00:00 🛠 *Node.js Authentication Basics*
- Introduction to authentication patterns in Node.js.
- Two basic patterns discussed: Stateful and Stateless authentication.

01:07 🚗 *Authentication Analogy: Parking Ticket*
- Illustration of stateful authentication using a parking attendant analogy.
- Comparison between providing a parking ticket and receiving a unique ID for server-side data maintenance.

02:02 🎟 *Stateless Authentication: Diary Entry*
- Explanation of stateless authentication using the example of a parking ticket without server-side data storage.
- Analogous process of generating and validating unique IDs for accessing resources.

03:38 🔄 *Transition to Server-Side Authentication*
- Transition from client-side to server-side authentication process.
- Example of a client sending a request with user credentials to the server for authentication.

04:09 📝 *Server-side session management*
- Understanding session IDs and their management on the server-side,
- Sending session IDs along with requests for server authentication,
- Utilizing cookies or headers for transferring unique IDs and managing authentication.

06:02 🛠 *Implementing authentication in the application*
- Setting up authentication middleware in the Express application,
- Validating tokens and unique IDs for authentication,
- Incorporating user data and authentication parameters into the application model.

08:52 🛠 *Creating Authentication Routes*
- Setting up authentication routes in Node.js.
- Creating a user model and defining routes for signup.
- Implementing controller functions for user signup.

10:13 📝 *User Signup Validation*
- Validating user input such as password length and email format.
- Handling user signup requests and responses.
- Importing user model and returning appropriate responses.

11:50 📲 *Handling User Registration*
- Implementing registration functionality for users.
- Defining routes and handling user registration requests.
- Creating user signup forms with input validation.

14:17 🛠 *Handling user sign-up form submission*
- Understanding form action and method,
- Troubleshooting form submission errors and refreshing the page.

16:04 🔑 *Ensuring successful user registration process*
- Configuring form redirection after successful registration,
- Implementing conditional logic for user access based on authentication status.

17:11 🚦 *Validating user credentials and redirecting*
- Validating user input for email and password,
- Implementing error handling and redirecting based on authentication status.

20:07 🛠 *Node.js Authentication Setup*
- Setting up authentication process in Node.js,
- Generating unique session IDs,
- Installing necessary packages and importing them.

21:32 🍪 *Cookie Generation and Handling*
- Creating and handling cookies for user sessions,
- Utilizing middleware to retrieve cookie values,
- Implementing functionality to refresh cookies upon server request.

22:59 📝 *Application Diary and Control Flow*
- Demonstrating control flow within the application,
- Logging user activities in the application diary,
- Managing user sessions and associated data.

24:56 🔒 *Middleware Function for User Authentication*
- Implementing middleware function for user authentication,
- Accessing user ID from cookies,
- Handling redirection based on user authentication status.

27:55 🍪 *Cookie Parsing and Validation*
- Parsing and validating cookies for user authentication,
- Ensuring proper access control based on URL paths,
- Handling cookie-related errors gracefully.

29:02 🛠 *Troubleshooting and Debugging*
- Debugging cookie reading and generation issues,
- Resolving errors related to undefined properties,
- Iterative debugging process for smoother development.

30:27 🛠 *Node.js Authentication Implementation*
- Implementing password generation and authentication in Node.js.
- Discussion on server restart issues affecting data integrity.
- Handling URL generation and user identification securely.

31:48 🔄 *URL Generation and Data Integrity*
- Addressing data integrity challenges upon server refresh.
- Ensuring correct URL generation and user identification after server restart.
- Implementing strategies to maintain data consistency and user authentication.

33:19 🖥 *Dynamic URL Handling and User Identification*
- Exploring middleware for dynamic URL handling and user identification.
- Adding user-specific references to generated URLs.
- Utilizing user IDs for personalized URL management and authentication.

34:44 🔒 *Implementing authentication logic*
- Creating middleware function to check authentication status.
- Simplifying authentication logic by restricting access.
- Handling authentication checks and redirects efficiently.

36:07 🧳 *Setting up user authentication*
- Creating a sign-up form with fields for full name, email, and password.
- Generating and validating short IDs for user authentication.
- Implementing basic authentication workflow and URL handling.

37:57 🚪 *Customizing user access and permissions*
- Limiting user access to their own analytics and URLs.
- Generating short IDs for user-specific data access.
- Ensuring secure and controlled authentication processes.

KrishnaKumar-khiu
Автор

Sir please cover JWT Authentication and Local Storage in depth.

iamakashkumarram
Автор

Great video bhaiya !! Please make more videos asap

mma-dost
Автор

Best Nodejs series out there and I am not even kidding how good he teaches

ratishjain
Автор

banda cool hay. Zabardast analogies use ki bhai. Happy to find a teacher like you. Wandering why your channel is so underrated.

muhammadzahir
Автор

my doubt
apne sessionIdToUserMap object me user ki uid or user ki details store ki hai pr ek time ke baad ye server ki bhot memory kha jayega to es object me se hr user ki details ek time ke baad apne aap delete ho jana chahiye

sahildhanawade
Автор

Hey piyush, can u make videos on styling web pages using tailwind css Or just css, in UI

pabloescobar.exe.
Автор

Sir setting user details in cookies would be done with express-session by default right?

rohitghadage
Автор

SIr on deployment why user persistence not there ?
means after one time logged in in any device i can generate url in another device also without logged in ?

coolcoder-bhic
Автор

First time I see Gravity Falls and Adventure Time crossover

imPrathamDev
Автор

Alert : these videos are knowledge heavy so please keep focused 🤯🤯🤯🤯😎😎😎

xoqjhsw
Автор

What if we want to pass the data to frontend like react app instead of .ejs views files
How to do it ?

lucifer.morningstar
Автор

Bhaiya if middle man proxy use karega he will get our api how we secure

fearwayesloot