Uploaded July 2022 | Updated December 2026, 3 hours ago
Handling authentication in NextJS using the next-auth package. I'll review strategies, patterns, and providers you can use to implement authentication in your NextJs apps.
➡️ Read the note on my site:
🔗 hamedbahram.io/notes/next-auth-v4
➡️ next-auth documentation:
🔗 next-auth.js.org/getting-started/introduction
➡️ Sendgrid SMTP API:
🔗 docs.sendgrid.com/for-developers/sending-email/integrating-with-the-smtp-api
➡️ The Ultimate NextJs Course
🔗 hamedbahram.io/courses/nextjs
Handling authentication in NextJS using the next-auth package. I'll review strategies, patterns, and providers you can use to implement authentication in your NextJs apps.
➡️ Read the note on my site:
🔗 hamedbahram.io/notes/next-auth-v4
➡️ next-auth documentation:
🔗 next-auth.js.org/getting-started/introduction
➡️ Sendgrid SMTP API:
🔗 docs.sendgrid.com/for-developers/sending-email/integrating-with-the-smtp-api
➡️ The Ultimate NextJs Course
🔗 hamedbahram.io/courses/nextjs





![Protecting routes in NextJs using Clerk middleware [6/6]
Using Clerk middleware to protect your routes in NextJs. The clerkMiddleware() integrates Clerk authentication through NextJs middleware.
👉🏼 Clerk auth
→ https://go.clerk.com/s1mVa9u
👉🏼 Learn Clerk
→ https://www.hamedbahram.io/courses/clerk Protecting routes in NextJs using Clerk middleware [6/6]](https://i.ytimg.com/vi/CCdf-TBbRmA/mqdefault.jpg)




