---
type: video
yt_id: VVU2YVRMdUlfajQtMHdpRFN6bWFQY3RRLi1KbkV1dlBtdC1R
videoId: -JnEuvPmt-Q
title: "Effortless Auth in Next.js 14: Use Auth.js & Drizzle ORM for Secure Login"
date: "2023-11-06T15:00:00Z"
slug: "effortless-auth-in-nextjs-14"
image: 
  name: "effortless-auth-in-nextjs-14.jpg"
  alt: "Effortless Auth in Next.js 14: Use Auth.js & Drizzle ORM for Secure Login"
  width: 1280
  height: 720
status: 'published'
description: "The newest version of Next Auth works really well with the App Router. If you follow this tutorial, your app will be ready for modern next.js and partial pre-rendering. Next auth is a popular library within the Next.js ecosystem, designed for managing user authentication and authorization in your application. "
tags: []
---

The newest version of Next Auth works really well with the App Router. If you follow this tutorial, your app will be ready for modern next.js and partial pre-rendering. Next auth is a popular library within the Next.js ecosystem, designed for managing user authentication and authorization in your application. 

In this tutorial, I'll guide you through the process of integrating Next Auth into your Next.js 14 app, utilizing the Drizzle ORM adapter. Everything will be using Server Actions and Server Components.  

This setup will enable users to log in to your app using social sign-in providers such as GitHub, with their user data securely stored in your database via Drizzle ORM.

Code and references:  [https://www.nexttonone.lol/next-auth](https://www.nexttonone.lol/next-auth)


Join this channel to get access to perks:
[https://www.youtube.com/channel/UC6aTLuI_j4-0wiDSzmaPctQ/join](https://www.youtube.com/channel/UC6aTLuI_j4-0wiDSzmaPctQ/join)

## Chapters:

* 0:00​ Intro
* 0:52 Setup Next Auth
* 3:16 Next Auth Providers
* 4:16 Setup Github
* 6:50 Sign In
* 7:30 User Session
* 11:09 Drizzle Adapter
* 15:36 Session User id
* 21:24 Using the user id
* 24:25 middleware
* 26:14 Conclusion


