Next.js 13.5 Authentication: Mastering Role-Based Security with AuthJS/NextAuth
ClarityCoders ClarityCoders
47.9K subscribers
5,792 views
0

 Published On Oct 17, 2023

In this coding tutorial, we explore the upcoming transition as NextAuth evolves into AuthJS. We'll provide the most up-to-date coverage, including the latest features in Next.js 13.5. Dive into the world of role-based authentication and learn how to implement authentication on both server-rendered and client-rendered pages. Discover how to leverage out-of-the-box OAuth providers like Google and GitHub, and explore the process of creating your custom authentication provider using MongoDB. Stay ahead in the world of authentication with this comprehensive guide!

⌨️ Need Source code? Members get updated full source code for all projects!
https://www.claritycoders.com/Projects

👊 You got something to say to me?? Join our discord!✌️
  / discord  

Chapters
0:00:00 Introduction
0:00:37 Enviroment Setup / Extension Review
0:01:20 Project Creation
0:02:05 Install NextAuth (Auth.js) / Create Project Structure
0:14:33 Create NextAuth (Auth.js) API - Options / Routes
0:24:35 Setup built-in OAuth Provider - (Google / GitHub)
0:28:43 Login / Logout Funtionality
0:35:41 Protecting Pages - Server Side Page
0:39:16 Protecting Pages - Client Side Page
0:45:08 Protecting Pages - Middleware
0:52:54 Creating Custom Provider (Creating a Database of Users)
0:54:12 MongoDB Atlas Signup / Setup
0:57:00 Create User Models (Mongoose Schema)
0:59:33 User Form to Create Users
1:09:26 Create Users API
1:17:41 Setup Custom Provider

show more

Share/Embed