Authentication in NextJs using next-auth

preview_player
Показать описание
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:

➡️ next-auth documentation:

➡️ Sendgrid SMTP API:

➡️ The Ultimate NextJs Course
Рекомендации по теме
Комментарии
Автор

ladies and gentlemen, what a class by this legend, one of the best videos on authentication I've ever seen

hlpires
Автор

This is the best next auth video on YouTube. Thank you so much.

ogbillity
Автор

Amazing video, so coherent and clear. Also the way you go into each detail, just in the right amount of depth is so good. I enjoy and learned a lot from your videos!

roniaxelrad
Автор

Sir you are awsome, you just explain the library so well, and please include this video in your playlist named "Authentication in Next Js 13".

sameedahri
Автор

Absolutely brilliant tutorial! I was about to start with your recent video "NextJs 13 Advanced - authentication, route groups, data fetching and more" as I am working on a project using the Next 13 app directory. I am glad I went through this first. NextAuth makes so much sense now, thank you! Instant sub! Hope you make more videos on Next 13 (w/app) and all the latest technologies (hint: tRPC) 😄.

azazahamed
Автор

Great work. Thank you so much for your guide

krababTurkey
Автор

i had problem to 6 hours and i find your video thank u so much. u are amazing thank uthank u thank u so much. u explain everytihing very clearly 🙏🙏🙏

batuhankir
Автор

Спасибо за отличный урок, который актуален и сейчас. Успехов каналу!

fflcetu
Автор

00:00 - Intro
01:27 - next-auth installation
02:55 - What are providers? (OAuth, Email/passwordless, credentials)
04:06 - OAuth implementation
09:58 - Email implementation
10:40 - -> Setup an adapter/database for session persistance
14:10 - Continue Email implementation
19:00 - Testing email auth
20:39 - Credential implementation
24:04 - Credential providers don't work with db sessions
24:46 - Alternative to session-based auth is token-based auth
26:07 - Adapters default to session-based/db. How to setup token-based strategy
32:52 - Pages option
34:14 - Callbacks option
36:20 - Adapters option
37:23 - Theme option
38:43 - Environment variables
39:39 - How to work with this session database
42:39 - useSession to hook into the context of the session
47:17 - Simplify with a auth component
50:36 - getSession
51:50 - signIn
1:01:27 - signOut
1:05:01 - Summary

brutis
Автор

Thank you very much for your video, I am French and it is the best explained video on nextAuth that I have found.
Quick question, what format does the token-session have when logging in with the credentials?

yspoon
Автор

Hey hamed, i m looking for a simple sign up method for users as sign in provided by next auth, which can then be synced with the sign in flow we already have using next auth

adildotcodes
Автор

This was very useful, thank you so.

Would be able to share the completed source code for this?

DanteMishima
Автор

Hi Hamed, thank you for the video. Out of interest, after retrieving / authenticating the user from one of the OAuth providers, did you save those details to a users collection in Mongo?

simonedwards
Автор

You mentioned you have a course on Twitter clone? Is it on Udemy? I can't find it

mohamedyoussef
Автор

Thanks for a video, I have a problem with the email provider. It seems I connected everything like I should in my nextjs since I get the message "CHECK YOUR EMAIL A sign in link has been sent to your email address.", but email never gets, I checked spam and all mails, and it doesn't deliver, what could be a problem?

Ja-rzfq
Автор

can you show how to config the google api console
my app said Error 400: redirect_uri_mismatch

i know its redirect URI but its only allow https, how you manage to handle this to work with localhost

eyotajr
Автор

Any idea how to implement email verification using a credentials provider ??

speedster
Автор

Make a video on how you create your blog fully

joscript
Автор

Would I be able to pay you for some of your time to answer some questions I have about next.js 13? I would love to be able to pick your brain and would be more than willing to make it worth your time.

xSeriEZxlife
Автор

Friend thanks for sharing... I'm following your series of videos


I'm telling you that GOOGLE suspended the api service for my country (that is, I can't use GoogleProvider)

I'm trying to connect using (next-auth and PRISMA) following your video series... but I need to connect via email and password.. (CredentialsProvider)

my query is in (loginUser) (see minute 23:24) the code is NOT complete... my question is the query to the DB to compare the information should be done with mongo or using prisma....

if you can guide me I thank you...
Att Jose Grillo



ESPAÑOL
Amigo gracias por compartir... estoy siguiendo tu serie de videos


Te comento que GOOGLE supendio el servicio de la api para mi pais (es decir NO puedo usar GoogleProvider)

Estoy tratando de conectarme usando (next-auth y PRISMA) siguiendo tu serie de video ... pero necesito conectarme a traves de un correo y un pasword .. (CredentialsProvider)

mi consulta es en (loginUser) (ver minuto 23:24) el codigo NO se ve completo... mi duda la la consulta a la BD para comparar la informacion se debe hacer con mongo o usando prisma....

si me puedes orientar te agradezco

Grishopping