The Ultimate Guide to Next Auth - Everything You Need

  Рет қаралды 58,938

Brett Westwood - Software Engineer

Brett Westwood - Software Engineer

Күн бұрын

Пікірлер: 274
@erickugel1376
@erickugel1376 Жыл бұрын
WOW THANK YOU this really really helped it was super clear and easy to follow
@brettwestwooddeveloper
@brettwestwooddeveloper Жыл бұрын
Thank you so much! I am glad you were able to follow my teachings easily! Thanks for tuning in and the donation!
@adammo6661
@adammo6661 3 ай бұрын
Maaaan this literally saved my life. I was struggling to get both credentials with next auth working, but it does now. THANK YOU SOOOO MUCH
@joe25x
@joe25x Жыл бұрын
One of the best tutorials I have seen on KZbin, you explained everything perfectly and in detail, looking forward to your next videos!
@brettwestwooddeveloper
@brettwestwooddeveloper Жыл бұрын
Thank you so much for the kind words!
@eshw23
@eshw23 Жыл бұрын
Just found your channel and subscribed, i like how your tutorials are long and in depth about concepts to understand instead of just project tutorials, and i dont think 10 or 15 minute short videos can do the same.
@brettwestwooddeveloper
@brettwestwooddeveloper Жыл бұрын
Welcome aboard!
@codewithsam7300
@codewithsam7300 Жыл бұрын
I am telling you this seriously. I have watched 20+ videos on KZbin about the same. All the time things didn`t worked out. But today i completed your video and trust me on this, your tutorial is the best tutorial in the whole world. Just wanted to say you thank You friend............
@brettwestwooddeveloper
@brettwestwooddeveloper Жыл бұрын
Thank you so much! Glad I could help you out
@hamzahahmad1670
@hamzahahmad1670 Жыл бұрын
Hey Brett, I wanted to thank you for the very comprehensive video. Authentication is always a messy topic, and it's very appreciable how you explained not only credentials but also social login. Thanks again
@brettwestwooddeveloper
@brettwestwooddeveloper Жыл бұрын
Thank you so much for the kind comment!
@gbani_d
@gbani_d Жыл бұрын
You're an amazing teacher, and this is premium content. The way you explain every step makes it feel like a one on one class. Thank you!
@brettwestwooddeveloper
@brettwestwooddeveloper Жыл бұрын
Thank you so much!
@briandacallos4234
@briandacallos4234 Жыл бұрын
You don't have no idea how much i need this, thank you. Clear and concise
@brettwestwooddeveloper
@brettwestwooddeveloper Жыл бұрын
No problem, glad I could help you!
@rafin_rahman
@rafin_rahman Жыл бұрын
the most comprehensive NextAuth tutorial, well done Brett!
@brettwestwooddeveloper
@brettwestwooddeveloper 6 ай бұрын
Thank you so much!
@phil5293
@phil5293 Жыл бұрын
Wow. Great video. I had to go through it twice to get everything right (I used typescript)
@pablopenia
@pablopenia Жыл бұрын
I did this hundred of times, but this is the first time I actually understand how it works. Thanks! you're a great teacher.
@brettwestwooddeveloper
@brettwestwooddeveloper Жыл бұрын
Awesome! Thank you! and no problem!
@shumit
@shumit Жыл бұрын
Simply FABULOUS !!! THANK YOU SO VERY MUCH !!! I followed along. Perfect. You showed every nitty-gritty, were not too fast, not too slow, did not switch screens/windows suddenly (which confuses us, the beginners), were describing what you were doing, where you were doing, and why you were doing. Once more, THANK YOU !!!
@brettwestwooddeveloper
@brettwestwooddeveloper Жыл бұрын
Thank you so much for the kind words and tuning in!
@carafachera4781
@carafachera4781 Жыл бұрын
Wow I just happily spend 5 hours watching and rewatching this video and I learned a lot. I don't know why I enjoyed some much. Thank Brett, you just earn a new loyal suscriber❤
@brettwestwooddeveloper
@brettwestwooddeveloper Жыл бұрын
Thank you so much! I am glad you learned a lot!
@harshwardhanmore5877
@harshwardhanmore5877 Жыл бұрын
you just saved my final year project man!!!! Thank You 1000 times
@brettwestwooddeveloper
@brettwestwooddeveloper Жыл бұрын
No problem! Glad I could help you out!
@hadirahal5403
@hadirahal5403 Жыл бұрын
Your channel deserves more attention! 10/10 explanation!
@brettwestwooddeveloper
@brettwestwooddeveloper Жыл бұрын
Thank you!
@aubreyocallaghan4539
@aubreyocallaghan4539 8 ай бұрын
Very useful. Appreciated showing both server and client auth
@brettwestwooddeveloper
@brettwestwooddeveloper 8 ай бұрын
No problem!
@ahasiakopian9696
@ahasiakopian9696 Жыл бұрын
Thank you for the video! When registering, you need to block the form submit button after clicking, since you can spam the button and there will be many identical users in the database, you also need to add a check on the server when creating. Also, do not add your .env file to the repository. Now you have data that other users can use for authorization, be careful
@rod6722
@rod6722 Жыл бұрын
Curious why you didn't use the session model? As is suggested in the Next Auth docs on the Prisma adapter.
@brettwestwooddeveloper
@brettwestwooddeveloper Жыл бұрын
Should have for tutorial purpose. But either way is fine. Definitely recommend using the adapter.
@ronokoushique7434
@ronokoushique7434 Жыл бұрын
@@brettwestwooddeveloper I don't understand why it's not working automatically when I am using the adapter. Should I have to change anything for the session table to get populated automatically? plz help
@sahaneakanayaka3394
@sahaneakanayaka3394 Жыл бұрын
The best tutorial I found so far about Next 13 authentication. Everything was explained clear. Thank you so much ...🙏😍😍
@brettwestwooddeveloper
@brettwestwooddeveloper Жыл бұрын
Thank you! You are welcome!
@isaachatilima
@isaachatilima Жыл бұрын
My search is over. Thank you Brett, great session
@brettwestwooddeveloper
@brettwestwooddeveloper Жыл бұрын
Thank you!
@waqaskhandev
@waqaskhandev Жыл бұрын
Really Awesome walk through for the Next Auth. Learned alot. Thanks
@brettwestwooddeveloper
@brettwestwooddeveloper Жыл бұрын
No problem! Thanks for tuning in!
@mubashirwaheed474
@mubashirwaheed474 Жыл бұрын
Thanks you so much for this video. Can you please make video on role based authentication?
@brettwestwooddeveloper
@brettwestwooddeveloper Жыл бұрын
No problem! And yes I can take a look into that, so something like admin login, user login, etc? protecting routes?
@mubashirwaheed474
@mubashirwaheed474 Жыл бұрын
@@brettwestwooddeveloper I have come across simple role based authentication videos but not ultimate guide per say. Role based authentication of user and admin using mongodb, prisma and next-auth. The major point of learning can be how to secure pages and then give access to certain routes only to the admin . For example: home and dashboard should be a protected route but only admin can access the dashboard.
@adrianhansa7018
@adrianhansa7018 Жыл бұрын
Great tutorial, Brett! I am glad I found your channel. Thanks!
@brettwestwooddeveloper
@brettwestwooddeveloper Жыл бұрын
Awesome, thank you!
@BBocho
@BBocho Жыл бұрын
Thank you very much, there are very few tutorials like this one implementing auth with the App Router, and it works perfectly fine!
@brettwestwooddeveloper
@brettwestwooddeveloper Жыл бұрын
Thank you! Glad I can help!
@raymondmichael4987
@raymondmichael4987 Жыл бұрын
Was scratching my head for this, using both credentials and social medias. Dude you just killed it, watched from zero to last seconds. Time to fight with TS into it 😊 Thanks buddy, thanks a lot ❤ Greetings from Tanzania 🇹🇿
@brettwestwooddeveloper
@brettwestwooddeveloper Жыл бұрын
No problem! Thanks for tuning in!
@joshuaekeh3775
@joshuaekeh3775 9 ай бұрын
Thanks Brett. Your tutorial is quite easy to follow. You've made very simple.
@mattburgess5697
@mattburgess5697 Жыл бұрын
This is a great and very helpful video, going through several different ways of logging in a user. Just one thing though… it’s not Prism. It’s very clearly PrisMA.
@brettwestwooddeveloper
@brettwestwooddeveloper Жыл бұрын
Thanks!
@mahmoua07
@mahmoua07 Жыл бұрын
This is a great explanation of next-auth , thank you brother.
@brettwestwooddeveloper
@brettwestwooddeveloper Жыл бұрын
You are welcome!
@jamesnelson174
@jamesnelson174 Жыл бұрын
Honestly, this guy is dope. I love this tutorial. ❤❤
@brettwestwooddeveloper
@brettwestwooddeveloper Жыл бұрын
Thank you!
@semajroyam3725
@semajroyam3725 Жыл бұрын
this is what I've been looking for after the update of nextjs, now i can implement this to my capstone project, thank you for this tutorial!
@brettwestwooddeveloper
@brettwestwooddeveloper Жыл бұрын
Glad I can help!
@Shubham-yc6nz
@Shubham-yc6nz Жыл бұрын
Best video on Internet. The latest greatest. I was bit confused about implementation using app/ directory thanks!!!
@brettwestwooddeveloper
@brettwestwooddeveloper Жыл бұрын
Thank you so much for the compliment!
@kathirmldata7411
@kathirmldata7411 Жыл бұрын
crystal clear explanation. easily understanding even for non English speaking country. thanks man. more love from india
@brettwestwooddeveloper
@brettwestwooddeveloper Жыл бұрын
Thank you! I am glad I can help! Thanks for the support
@CaseStudyQB
@CaseStudyQB Жыл бұрын
Great video. Great job explaining each step and also showing how the network side of things looks in the browser console/tools. Thanks so much! I just subscribed!
@mbaochachigozie1785
@mbaochachigozie1785 Жыл бұрын
By far the best nextAuth tut
@brettwestwooddeveloper
@brettwestwooddeveloper Жыл бұрын
Thank you!
@mayukhhazari7820
@mayukhhazari7820 Жыл бұрын
Incredible brother 🙌🙌
@brettwestwooddeveloper
@brettwestwooddeveloper Жыл бұрын
Thank you!
@henrymunoz2035
@henrymunoz2035 Жыл бұрын
Love it great work, thank you so much
@brettwestwooddeveloper
@brettwestwooddeveloper Жыл бұрын
You are welcome! Thanks for tuning in!
@tworzymy_historie
@tworzymy_historie Жыл бұрын
I think this is what i need to be mid after almost 2 yers of commercial work and more years hobby coding ;) Ty!
@diamondpro2093
@diamondpro2093 Жыл бұрын
Hey, love the videos. They are really helpful and concise. I was wondering if you could possibly make a video on what changes would have to be made to the application when its being pushed into production (i.e. changing specific environment variables, etc)
@KkrDs97
@KkrDs97 Жыл бұрын
This is Exactly what i am looking for and great explanation from you, Thank you.
@brettwestwooddeveloper
@brettwestwooddeveloper Жыл бұрын
No problem! Glad I could help!
@chriseski
@chriseski Жыл бұрын
Like and subscription earned as deserved! Thank you Brett, awesome tutorial!
@brettwestwooddeveloper
@brettwestwooddeveloper Жыл бұрын
Thank you for the sub!
@7harux
@7harux Жыл бұрын
one of the best tutorials I've seen
@brettwestwooddeveloper
@brettwestwooddeveloper Жыл бұрын
Thank you so much!
@abhask01
@abhask01 5 ай бұрын
watching after 1 year but thanks bro learned a lot
@Leesdjo
@Leesdjo 8 ай бұрын
Very detailed video. Thank you so much.
@kamilwitek8434
@kamilwitek8434 Жыл бұрын
Hi Brett, why on folder name u put [...nextauth] - in js that is the way to copy array but don't understand why do we name like that folder
@brettwestwooddeveloper
@brettwestwooddeveloper Жыл бұрын
it's called a catch all route when named like that. This allows you to run multiple API requests from that folder
@goldmikanik8274
@goldmikanik8274 Жыл бұрын
Thank you for the explanation, just a question please, when user register he actually doesn't get auth cookies, he needs to signin after that to get them right? If yes, is there a way to tweak that, would be nice if user can register and start using his dashboard for example. Thank you again.
@huyphamminh6911
@huyphamminh6911 Жыл бұрын
i have a question, when you log in, next auth give you 3 tokens (next auth handled it), but how about when you sign up, you sent back user object via json, so we cant get the session when you sign up right
@codePerfect
@codePerfect Жыл бұрын
Loved the tutorial
@brettwestwooddeveloper
@brettwestwooddeveloper Жыл бұрын
Thank you!
@chesscom-z1o
@chesscom-z1o Жыл бұрын
Good job sir really impressive content. Thank you very much for sharing. 1. On a purely cosmetic side, in the login page, instead of the h1 "Sign into Github below" , I would rather change the button label to "Sign into Github". Same goes true for Google. 2. Are you planning to add a "reset forgotten passwords" functionality, since this is the "Ultimate" guide ? Best regards.
@movocode
@movocode Жыл бұрын
Thank you for the tutorial.
@brettwestwooddeveloper
@brettwestwooddeveloper Жыл бұрын
You are welcome!
@sguitas
@sguitas Жыл бұрын
This helped me a lot, thanks. Very clear explanation
@brettwestwooddeveloper
@brettwestwooddeveloper Жыл бұрын
Glad I could help!
@owenwijaya108
@owenwijaya108 Жыл бұрын
this is fucking gold, you earned an instant subscriber!
@brettwestwooddeveloper
@brettwestwooddeveloper Жыл бұрын
Thanks for the sub! Appreciate it!
@owenwijaya108
@owenwijaya108 Жыл бұрын
@@brettwestwooddeveloper don't even mention it, you greatly deserved it bruh
@devsspace1918
@devsspace1918 Жыл бұрын
Thank you for sharing this insightful video.
@brettwestwooddeveloper
@brettwestwooddeveloper Жыл бұрын
No Problem!
@yongsujeong7870
@yongsujeong7870 Жыл бұрын
This is the best tutorials I have seen on KZbin Awesome! Could you tell me the reason why we need to add "/test" url at the end of the DATABASE_URL? Thank YOu!!
@brettwestwooddeveloper
@brettwestwooddeveloper Жыл бұрын
thank you for the compliment and technically you can have whatever name you what instead of test. This will be your collection name in mongodb
@yongsujeong7870
@yongsujeong7870 Жыл бұрын
@@brettwestwooddeveloper Really appreciate your answer!! Have a wonderful day!!!!😄😄
@leviathanxid
@leviathanxid Жыл бұрын
Thankyou so much sir ,this video is really helped me
@brettwestwooddeveloper
@brettwestwooddeveloper Жыл бұрын
No problem! Thank you for watching my video! Don't forget to hit that subscribe!
@AlfredLotsu
@AlfredLotsu Жыл бұрын
this is so sick bro thank you
@brettwestwooddeveloper
@brettwestwooddeveloper Жыл бұрын
No problem!
@mediacreatif
@mediacreatif Жыл бұрын
In the async authorize(credentials) function, I would fetch an API login. It's more clear for me. There is an API to register and there is an API to login.
@Jerac07
@Jerac07 Жыл бұрын
Great tutorial!!! One of the best I've seen. Quick question : How would you make an admin account that would see all other account is some sort of table?
@brettwestwooddeveloper
@brettwestwooddeveloper Жыл бұрын
thank you! and you would have to create a custom value for admin signups through the login functionality. I would have to look into it more, and when I get good with it I can create a video on that topic. That is a very good topic that would be helpful!
@Jerac07
@Jerac07 Жыл бұрын
@@brettwestwooddeveloper thank you alot. That would be super helpfull. Keep up the good work and all the best from Zagreb, Croatia!
@ekchills6948
@ekchills6948 Жыл бұрын
You're the best thank you ❤️
@brettwestwooddeveloper
@brettwestwooddeveloper Жыл бұрын
You are welcome!
@ekchills6948
@ekchills6948 Жыл бұрын
@@brettwestwooddeveloper i just finished and its really alot of information to digest, especially the way the google and github user is added to the database )): but overall I loved it
@bengraham1798
@bengraham1798 Жыл бұрын
Thank you 🙏
@brettwestwooddeveloper
@brettwestwooddeveloper Жыл бұрын
You are welcome!
@samuelpalacios9661
@samuelpalacios9661 Жыл бұрын
Hey Brett, amazing tutorial, one question, why you dind't use the Session model that next-auth provides as a starter code for prisma schema? (I guess its because that if we use jwt, the sessions will not be saved on the db)
@younkezenger8117
@younkezenger8117 6 ай бұрын
As a beginner, I am also struggling on understanding the difference between this two models. Need some help to understand why choose one or another
@samuelpalacios9661
@samuelpalacios9661 6 ай бұрын
@@younkezenger8117 Session only is used when you implement google/github auth options, so instead of only creating a user you also create a session. Hope this helps
@TBDfilesLalit_kalyan
@TBDfilesLalit_kalyan Жыл бұрын
thankyou so much for this tutorial ......kaap doing
@ozgursar5386
@ozgursar5386 Жыл бұрын
Thank you for the nicely structured and detailed tutorial. I just couldn't understand how the signin to OAuth providers created the Account and User documents in mongodb.
@brettwestwooddeveloper
@brettwestwooddeveloper Жыл бұрын
My most recent videos go more in depth about session data/object. I would recommend console logging profile, user, session and all to see what data you get back
@Dhanushsaji
@Dhanushsaji 8 ай бұрын
I think for protected route we should use middleware page
@brettwestwooddeveloper
@brettwestwooddeveloper 8 ай бұрын
Yes ideally you should, but you can use it on individual pages as well if you want per the documentation.
@jenniferjohnston9236
@jenniferjohnston9236 Жыл бұрын
great tutorial! you should do one of these with next-auth-sanity
@brettwestwooddeveloper
@brettwestwooddeveloper Жыл бұрын
Great suggestion! Only tried sanity once
@mryoung205
@mryoung205 Жыл бұрын
i loved this ... and i added next auth to my project. but i still dont know how to protect a sever side page... i am getting error in my seversideprops
@lostinthenarrativve
@lostinthenarrativve 7 ай бұрын
Hey man, which of these videos should I watch first, this or the one that's titled "Nextauth credentials provider" ?
@brettwestwooddeveloper
@brettwestwooddeveloper 6 ай бұрын
I would watch this one first because it goes over everything. There is a new version of Next-Auth which is in beta. However, you can still use this video as a guide and is still relevant. I have other videos as well on my channel going over the session object and much more!
@R6videos6R
@R6videos6R Жыл бұрын
Wow, you resolved my problem. Anywhere in the documentation was the error handling with the callback.ok and callback.error
@ahmetsakrak
@ahmetsakrak Жыл бұрын
It's a truly informative and well-made video. I still have two lingering questions. First, what difference does it make in the underlying operation of Next Auth if we don't specify 'jwt' as a strategy? Second, why didn't you touch upon the topic of Middleware? It's crucial for user experience.
@0zankurt
@0zankurt Жыл бұрын
Could you please make a video for laravel sanctum version of this?
@brettwestwooddeveloper
@brettwestwooddeveloper Жыл бұрын
Hi, sorry I have never used that
@MrKeliv
@MrKeliv Жыл бұрын
I love your video. I want to ask about protect the page with user has not been authenticated ? How to do that ? Thank you
@brettwestwooddeveloper
@brettwestwooddeveloper Жыл бұрын
Thank you and you just have to create a middleware file on the root of the whole project. export { default } from "next-auth/middleware" export const config = { matcher: ["/dashboard"] } This protects the dashboard page
@MrKeliv
@MrKeliv Жыл бұрын
@@brettwestwooddeveloper Ok thank you. I already watch in another video. It has two option server side or client side. Glad to watch your video and help
@Adrian-mu8gg
@Adrian-mu8gg Жыл бұрын
did i miss where the app is going to handle resetting password for credential provider? do you hv a tutorial on how to do that, and to assign role?
@Mike-ks7nr
@Mike-ks7nr Жыл бұрын
at 25:41 when i try to sign in it gives me an error. Says: "Sign in failed. Check the details you provided are correct." But in inspector it has 302 Found
@brettwestwooddeveloper
@brettwestwooddeveloper Жыл бұрын
I would need more information to help you out there
@merumeruedit
@merumeruedit Жыл бұрын
Ty for your good tut i have a question what plugin you use that show auto complete before coding?
@brettwestwooddeveloper
@brettwestwooddeveloper Жыл бұрын
Thanks and its called github copilot
@p.durgashankar4464
@p.durgashankar4464 Жыл бұрын
Best explanation.
@brettwestwooddeveloper
@brettwestwooddeveloper Жыл бұрын
Thank you!
@jesustzinon
@jesustzinon Жыл бұрын
If is not too much to ask, can you expand these series of videos of auth by adding password recover and normal and admin user roles?
@brettwestwooddeveloper
@brettwestwooddeveloper Жыл бұрын
Yes I can do that, I already have recent videos on next auth jwt session
@chris-zlrr
@chris-zlrr Жыл бұрын
great content 👌🏼
@nobody2937
@nobody2937 Жыл бұрын
Thank you very much... Thank you ...
@asithathennakoon3431
@asithathennakoon3431 Жыл бұрын
Keep up the good work bro..
@brettwestwooddeveloper
@brettwestwooddeveloper Жыл бұрын
Thank you!
@daniyalfarooq998
@daniyalfarooq998 Жыл бұрын
why cant i get fields other than name , email in the session? i tried returning user object with a field of Contact from [...nextauth] page too. but it is not carried into home page. btw Thanks for such a comprehensive tut. :)
@brettwestwooddeveloper
@brettwestwooddeveloper Жыл бұрын
Thank you for tuning in, and by default you only get the name and email in the session. You must use the JWT strategy and then pass the data through the jwt to the session using asyn callbacks. I have a video on this: kzbin.info/www/bejne/mJy4noFvia2SnrM
@daniyalfarooq998
@daniyalfarooq998 Жыл бұрын
i have been using this procedure for some apps but now i have been facing an issue. The signup with google isnt working directly in api/auth/signup unless i remove the // adapter: PrismaAdapter(prisma) line in nextauth route. The signin with google isnt working at all from the login page in (site) folder. If there are any changes we should do then itll be really great because i have tried alot of stuff but nothing worked out for me. Youre a great teacher :)@@brettwestwooddeveloper
@codingcambodia
@codingcambodia Жыл бұрын
Do you have a video using next-auth and role base access control,. Like basic , admin ... ?
@brettwestwooddeveloper
@brettwestwooddeveloper Жыл бұрын
no i do not
@madanmalhotra
@madanmalhotra Жыл бұрын
Our next PM will be 👉👉Brett 👏
@silviojava96
@silviojava96 Жыл бұрын
Great tutorial, but i'm getting this error: Error parsing attribute "@default": The current connector does not support the `auto()` function.
@brettwestwooddeveloper
@brettwestwooddeveloper Жыл бұрын
I would need more information on the code to help you out there
@SingleSeeker
@SingleSeeker Жыл бұрын
what about the get refresh token strategy?
@basics-school
@basics-school Жыл бұрын
Very good video..But dont we need to store the session in db?
@brettwestwooddeveloper
@brettwestwooddeveloper Жыл бұрын
don't think so, would have to get back with you on that
@17Kpa
@17Kpa Жыл бұрын
If I need to bring me the user id and the roles, how would I do it? Great Video !
@fadilarfat4974
@fadilarfat4974 Жыл бұрын
can you make a continuation video of this to deploy, i got a trouble to deploy it all of the authentication is not working after i deploy it
@johndeer8405
@johndeer8405 Жыл бұрын
Hi, can you do a really short video showing us how to setup a DELETE api route handler with and without prisma or at least with prisma. The new way in next13(app) is a bit confusing. Thanks for the content!
@brettwestwooddeveloper
@brettwestwooddeveloper Жыл бұрын
Yes I can start working on it
@johndeer8405
@johndeer8405 Жыл бұрын
@@brettwestwooddeveloper thanks Brett, you are appreciated.
@lamechamalisrael
@lamechamalisrael 10 ай бұрын
Unfortunately, this isn't EVERYTHING I need. What I need now is to know why the adapters work in the development environment. But when I upload it to AWS Amplify, I cannot use the JWT to sign in any longer.
@dhavalbhimani1952
@dhavalbhimani1952 8 ай бұрын
Bro great video but I want to learn more about middleware stuff with google provider. Please help with that
@rdrudra1628
@rdrudra1628 Жыл бұрын
Theme Name Please?
@brettwestwooddeveloper
@brettwestwooddeveloper Жыл бұрын
for my text editor?
@israelebonko4176
@israelebonko4176 24 күн бұрын
How do you configure Google Auth for a production project @all
@brettwestwooddeveloper
@brettwestwooddeveloper 24 күн бұрын
What do you mean by production project @all?
@israelebonko4176
@israelebonko4176 23 күн бұрын
@@brettwestwooddeveloper Thank you very much. I'm building a personal project solo. And your video has been very helpful in setting up an auth system. My issue is that I have my nextjs project live now on vercel with a domain name. And I'm confused because I don't know what to set as the authorized redirect url. localhost:3000 or my new domain name. Do we need to click "publish app" for live projects on oauth consent screen?
@hardrockwebdevelopers3383
@hardrockwebdevelopers3383 Жыл бұрын
Thanks!!! 😁
@brettwestwooddeveloper
@brettwestwooddeveloper Жыл бұрын
No problem!
@fixesdev
@fixesdev Жыл бұрын
Hi, nice video btw! Im very thankfull! One doubt, in the object of useSession i am not receiving and status key? is there a reason for that?
@fixesdev
@fixesdev Жыл бұрын
nevermind, i got it!
@reynaldobocaling4200
@reynaldobocaling4200 10 ай бұрын
Please another tuts about next js with typescript, thankyou brother❤
@StartNight-df3sv
@StartNight-df3sv 10 ай бұрын
Excellent tutorial. Unfortunately its not completed without JWT token option. Btw, you must modify your system environment for KZbin tutorials. I mean your display resolution must not exceed 1080 HD Now all your screen texts are very tiny and makes a lot of eye strain.
@prashlovessamosa
@prashlovessamosa Жыл бұрын
Thanks man
@brettwestwooddeveloper
@brettwestwooddeveloper Жыл бұрын
You are welcome!
@hafsahussein2016
@hafsahussein2016 Жыл бұрын
is there any way to prompt the custom errors in the register router? because something went wrong doesn't make sense, the user wants to know what is wrong.
@mediacreatif
@mediacreatif Жыл бұрын
For security purpose, you should not return the hashed password in the API register code. Just return the name and the email.
@brettwestwooddeveloper
@brettwestwooddeveloper Жыл бұрын
correct
@xouteiro0330
@xouteiro0330 Жыл бұрын
Thank you for the great video, it helped a lot, but I have a problem regarding google auth, when I log in with google the first time and log out, the next time i try to login with google it automatically logs in with that account, it doesnt let the user choose another one I already tried a lot of things and nothing seems to work Thanks a lot again, great video!!
@brettwestwooddeveloper
@brettwestwooddeveloper Жыл бұрын
did you sign out?
@xouteiro0330
@xouteiro0330 Жыл бұрын
Yes, and when I sign in again with google it doesnt let me choose another account
@asfnobambu
@asfnobambu Жыл бұрын
How this setup creates private routes only reachable by authenticated users ?
@brettwestwooddeveloper
@brettwestwooddeveloper Жыл бұрын
At the end of the video I show how to set up authenticated routes. But there is other ways to show routes to paying customers only!
Set up Google OAuth with Next.js using Next-Auth!
21:00
Build SaaS with Ethan
Рет қаралды 34 М.
The Ultimate Guide for Auth.js v5 - Part 1 (Configuration, Database, Prisma)
47:30
Brett Westwood - Software Engineer
Рет қаралды 1,5 М.
UFC 310 : Рахмонов VS Мачадо Гэрри
05:00
Setanta Sports UFC
Рет қаралды 1,2 МЛН
Cat mode and a glass of water #family #humor #fun
00:22
Kotiki_Z
Рет қаралды 42 МЛН
99.9% IMPOSSIBLE
00:24
STORROR
Рет қаралды 31 МЛН
Next Auth - JWT & Session Callback & How to Update User Session
31:34
Brett Westwood - Software Engineer
Рет қаралды 51 М.
Next-Auth on App Router - Solid Auth, Super Fast
17:20
Jack Herrington
Рет қаралды 124 М.
The Ultimate Guide To Next.js Route Handlers - CRUD
1:14:53
Brett Westwood - Software Engineer
Рет қаралды 6 М.
Next.js Authentication - AuthJS / NextAuth for Role-Based Security
1:26:55
freeCodeCamp.org
Рет қаралды 118 М.
OAuth 2.0 and OpenID Connect (in plain English)
1:02:17
OktaDev
Рет қаралды 1,8 МЛН
Trump's Plan for "Greater America" Explained
8:42
TLDR News Global
Рет қаралды 649 М.
Next Auth Credentials Provider - Ultimate Guide
50:01
Brett Westwood - Software Engineer
Рет қаралды 53 М.
UFC 310 : Рахмонов VS Мачадо Гэрри
05:00
Setanta Sports UFC
Рет қаралды 1,2 МЛН