No video

Next Auth Credentials Provider - Ultimate Guide

  Рет қаралды 50,278

Brett Westwood - Software Engineer

Brett Westwood - Software Engineer

Күн бұрын

Пікірлер: 177
@edwinmuriithi9819
@edwinmuriithi9819 8 ай бұрын
The clarity in your delivery and step-by-step guidance turned what was a struggle for me into a smooth learning experience.Cheers! 👏🚀
@brettwestwooddeveloper
@brettwestwooddeveloper 8 ай бұрын
Thank you Edwin! Glad you find my teachings easy to follow!
@arxci9402
@arxci9402 10 ай бұрын
Im going to lose my mind hearing you say Prisma wrong
@Code-prince
@Code-prince 25 күн бұрын
You are a good teacher thanks. Even as i used next14 it still looked simple with no errors
@AbhithShaji
@AbhithShaji 4 ай бұрын
This is best next-auth video i've seen. Great work man.
@codelery414
@codelery414 Жыл бұрын
Brett keeps dropping the right tutorials at the time I need them. Good job sir
@brettwestwooddeveloper
@brettwestwooddeveloper Жыл бұрын
Thank you!
@tsykin
@tsykin 5 ай бұрын
Best tutorial I have seen on credentials auth with NextAuth! Thank you so much for providing such valuable guidance, it was really easy to follow and understand 👍 Instant sub
@brettwestwooddeveloper
@brettwestwooddeveloper 5 ай бұрын
Thank you so much for the sub! Glad I was able to help you out!
@patrickmbugua4942
@patrickmbugua4942 8 ай бұрын
I really sort this type of content,prisma,custom login page ,credentials,next-auth so far this is the best tutorial for that
@brettwestwooddeveloper
@brettwestwooddeveloper 8 ай бұрын
Thank you so much Patrick!
@patrickmbugua4942
@patrickmbugua4942 8 ай бұрын
Did you do the reset of password by the user @@brettwestwooddeveloper
@user-gc5qm4er3b
@user-gc5qm4er3b 10 ай бұрын
So cool. The tutorials in the Chinese community are so old that I had to come here for help
@brettwestwooddeveloper
@brettwestwooddeveloper 10 ай бұрын
Awesome! Glad you were able to check out my channel!
@UsamaAnsari-j4i
@UsamaAnsari-j4i Ай бұрын
Thanks a lot. Your explanation was very clear and concise 😊
@DagmarJS
@DagmarJS 3 ай бұрын
Thank you a lot for the tutorial 💕 I was searching for a tutorial how to implement credentials in NextAuth and IMO this video is the best one I found
@yanDev
@yanDev Жыл бұрын
Thanks from France for this Tutorial!
@brettwestwooddeveloper
@brettwestwooddeveloper Жыл бұрын
No problem! Thanks for tuning in!
@spektree8448
@spektree8448 10 ай бұрын
Bro is majestic
@brettwestwooddeveloper
@brettwestwooddeveloper 9 ай бұрын
hahaha Thank you!
@SUSPICIOUSCABBAGE
@SUSPICIOUSCABBAGE 9 ай бұрын
Thank you. The official next auth guide for credentials provider is broken and this helped out
@brettwestwooddeveloper
@brettwestwooddeveloper 8 ай бұрын
No problem! Glad I could help!
@kenthefley2226
@kenthefley2226 Жыл бұрын
Great tutorial, Brett. It would be really cool to learn how add to this so a user can reset their password.
@brettwestwooddeveloper
@brettwestwooddeveloper Жыл бұрын
Yes I can add that to my video list
@mounirben9370
@mounirben9370 4 ай бұрын
THANKS FOR THIS GREAT TUTORIAL
@brettwestwooddeveloper
@brettwestwooddeveloper 4 ай бұрын
No problem!
@aymendev1
@aymendev1 Жыл бұрын
You did miss a part , if we look at the redirect method that you made after signIn , even if the user provide wronf credentials , it still route him to dashboard
@harsinghsekhon5935
@harsinghsekhon5935 8 ай бұрын
Yes, Thanks someone also noticed it.
@dios8256
@dios8256 8 ай бұрын
1 big problem with this is that credentials provider auth is not persisted in the DB. So you can't use getServerSession in server components which are used frequently in later versions of next!
@isSatoshiReal
@isSatoshiReal Жыл бұрын
Very good, followed your tutorial and got everything working, subscribed.
@shanemur
@shanemur 10 ай бұрын
Brett keeps deleting my comment so I'll keep writing it. If you're here in believe that this is a solid tutorial on Next auth, this ain't!!! Brett solution is utter rubbish!! I've recreated he's solution only to find zero authentication happening, users can access the dashboard page by localhost:300/dashboard WITHOUT NEVER logging in!!! users can login with any email or password without NEVER registering that user. He's solution is a complete joke. Don't waste your time here I like, there is ZERO authentication happening with he's tutorial!!!
@oleksandrstepaniuk9491
@oleksandrstepaniuk9491 11 ай бұрын
Дякую, саме те що шукав!
@merakli2022
@merakli2022 Жыл бұрын
Thank you for the great tutorial. Keep up the good work!
@brettwestwooddeveloper
@brettwestwooddeveloper Жыл бұрын
Thank you for tuning in!
@patite3103
@patite3103 Жыл бұрын
Could you please provide the link to the Github repository for the code? thank you
@shanemur
@shanemur 10 ай бұрын
Brett keeps deleting my comment so I'll keep writing it. If you're here in believe that this is a solid tutorial on Next auth, this ain't!!! Brett solution is utter rubbish!! I've recreated he's solution only to find zero authentication happening, users can access the dashboard page by localhost:300/dashboard WITHOUT NEVER logging in!!! users can login with any email or password without NEVER registering that user. He's solution is a complete joke. Don't waste your time here I like, there is ZERO authentication happening with he's tutorial!!!
@user-vl6hc6zs5b
@user-vl6hc6zs5b 8 ай бұрын
Thanku sir this video very helpful for and my all concepts and doubts are clear.🥰🥰
@brettwestwooddeveloper
@brettwestwooddeveloper 8 ай бұрын
Awesome! Glad to hear that!
@snoopytoon2589
@snoopytoon2589 Жыл бұрын
The Best Next-Auth tutorial on the internet
@eshw23
@eshw23 Жыл бұрын
Nextjs CRUD with prisma and a database would be great, maybe a simple todo app?
@TedMosby-fk5gj
@TedMosby-fk5gj Жыл бұрын
Definately
@brettwestwooddeveloper
@brettwestwooddeveloper Жыл бұрын
Will do!
@maxpayne9074
@maxpayne9074 11 ай бұрын
I don't understand. How this example use adapter Prisma? Session won't be save in database. We can you next-auth without adapter Prisma, and in authorize () call Prisma.
@mdamirhossain9376
@mdamirhossain9376 Жыл бұрын
Awesome content. Just right things at the right time. Love it.
@brettwestwooddeveloper
@brettwestwooddeveloper Жыл бұрын
Glad you enjoyed it!
@shanemur
@shanemur 10 ай бұрын
Brett keeps deleting my comment so I'll keep writing it. If you're here in believe that this is a solid tutorial on Next auth, this ain't!!! Brett solution is utter rubbish!! I've recreated he's solution only to find zero authentication happening, users can access the dashboard page by localhost:300/dashboard WITHOUT NEVER logging in!!! users can login with any email or password without NEVER registering that user. He's solution is a complete joke. Don't waste your time here I like, there is ZERO authentication happening with he's tutorial!!!
@tecsmith_info
@tecsmith_info 6 ай бұрын
16:11: You can also get a string from the cmd 'openssl rand -base64 32' 😄
@harsinghsekhon5935
@harsinghsekhon5935 8 ай бұрын
Thank you so much Brett!
@brettwestwooddeveloper
@brettwestwooddeveloper 8 ай бұрын
No problem! Thank you for tuning in!
@mateimarian2630
@mateimarian2630 11 ай бұрын
Thanks it helped me a lot, when building my Saas.
@shivpratik
@shivpratik 9 ай бұрын
Thank you for the detailed tutorial! Can you also make a video on "Remember Me" functionality with Next Auth?
@xannylz
@xannylz 6 ай бұрын
Thanks blud!!
@brettwestwooddeveloper
@brettwestwooddeveloper 6 ай бұрын
No problem! Thanks for tuning in!
@moteteletsa2034
@moteteletsa2034 8 ай бұрын
Excellent video, and I was able to implement auth in my app just by watching this video. However, in my case, session object only has email address, and both name and image are undefined, but in your case, the name property has your name, and the only field that does not have a value is image. Here are my questions: Where are name, email and image properties defined for a session object? How do I fill then with information? (By the way, it took me to watch your video on callbacks to include that name, but I am just curious as to why it was not happening with me yet in your case the name property was being appropriately filled ). Thanks in advance.
@brettwestwooddeveloper
@brettwestwooddeveloper 8 ай бұрын
Thank you for checking out my content and to answer your question: it can be multiple reasons. If you are using the credential provider, make sure to check your register API endpoint and that you are successfully registering a user to your database. Then make sure your catch all route is correctly verifying the credentials on the sign in. I would recommend console logging values that are associated with your login to see which step isn't working correctly.
@axryuk
@axryuk 7 ай бұрын
You cant use prisma adapter and jwt at the same time lol ,when using JWT you have pretty much no control over sessions after you give them out - you cant revoke the token on user deletion for example, You should have explained that
@brettwestwooddeveloper
@brettwestwooddeveloper 7 ай бұрын
maybe next video, you can sit me down and explain to me what details I should go over.
@olaleyeoyewunmi6978
@olaleyeoyewunmi6978 Жыл бұрын
Really love your video… please can you make a video using typescript … I’m having issues passing the session as a props in the rootLayout
@kmustafa0
@kmustafa0 3 ай бұрын
Thanks a lot
@brettwestwooddeveloper
@brettwestwooddeveloper 3 ай бұрын
You are welcome!
@kavinselvaraj733
@kavinselvaraj733 Жыл бұрын
really nice great and thanks, Keep Going
@brettwestwooddeveloper
@brettwestwooddeveloper Жыл бұрын
Thanks for tuning in!
@techreview588
@techreview588 6 ай бұрын
Awesome Tutorial! Can You Please Tell me Which Extension you used who gave you the recommended Code to write for the next line?
@romankostiuk
@romankostiuk 7 ай бұрын
Minute 47, when you just wrapped body with Provider - it's not works. Not sure why for now. I esume because you didnt pass any props to provider and Session provider requires session as a prop but its possible onli in client component. That why I hate tutorials who are not using typescript. Anyways, actualy very good and detailed tutorial but still you shold try to use typescript for you work and for tutorials as well because a lot of bugges appire when you not use TS.
@romankostiuk
@romankostiuk 7 ай бұрын
actualy, I was wrong as well, it was not working because due to you tutorial if there is no email or password you returning new NextResponse which is not correct. This function can return aither user object or null. authorize function is not correct place to handle errors in this case
@jellyfish1772
@jellyfish1772 9 ай бұрын
you should have used typescript
@brettwestwooddeveloper
@brettwestwooddeveloper 8 ай бұрын
Yea i know :(
@CodeHassanX
@CodeHassanX 10 ай бұрын
Amazing
@brettwestwooddeveloper
@brettwestwooddeveloper 10 ай бұрын
Thank you!
@gaopeng6573
@gaopeng6573 8 ай бұрын
Thanks mate, that is great video! By the way, how could I test credentials signin or signup with postman? Thank you!
@brettwestwooddeveloper
@brettwestwooddeveloper 8 ай бұрын
You can use the endpoint for that catch all route and test it with that endpoint. You can test with a POST request for register and GET for login
@WM-fz5si
@WM-fz5si Жыл бұрын
Nice video brett but also looking for all those actions including accessToken and refresh token for authorization.
@brettwestwooddeveloper
@brettwestwooddeveloper Жыл бұрын
Yes I can do that as well. Felt video was long already
@WM-fz5si
@WM-fz5si Жыл бұрын
@@brettwestwooddeveloper Yes Brett that will be really helpful 👍
@WM-fz5si
@WM-fz5si Жыл бұрын
Hey Brett which screen recording software and which video editing software for you use for your videos?
@brettwestwooddeveloper
@brettwestwooddeveloper Жыл бұрын
@@WM-fz5si obs studio for recording and premiere pro for editing
@WM-fz5si
@WM-fz5si Жыл бұрын
@@brettwestwooddeveloper Thanks buddy 👍
@tampantapipemalu6448
@tampantapipemalu6448 8 ай бұрын
wow, thanks sir
@SamTipton
@SamTipton 6 ай бұрын
Is it strange to anyone else that an authentication library requires that you write your own password check logic? What am I missing here?? Why don't the docs start with a canonical example. I would imagine many projects are not going to want to go with only social logins.
@brettwestwooddeveloper
@brettwestwooddeveloper 6 ай бұрын
Actually Next Auth says they recommend not to using the credentials provider. So, they do not provide any password check logic out of the box.
@SamTipton
@SamTipton 6 ай бұрын
@@brettwestwooddeveloper how innovative...
@Nexjsdeveloper
@Nexjsdeveloper 10 ай бұрын
tnx, great tutorial, my question is how bcrypt can unhash hashedPassword without any salt ? (how this working?)
@brettwestwooddeveloper
@brettwestwooddeveloper 9 ай бұрын
You would have to salt the password. And then use bcrypt package custom methods to unhash.
@tolyan8161
@tolyan8161 11 ай бұрын
git repo would be super-helpful with few nuances
@jatinduggal1975
@jatinduggal1975 7 ай бұрын
you used dashboard page as client side, means all the protected routes will be client side ??? if yes, then whats the benefit of server side rendering in app router ?? please share the feedback
@brettwestwooddeveloper
@brettwestwooddeveloper 7 ай бұрын
You can have a client side page and still have it as a protected route. Client side is necessary for interactivity. Protected means that if the user isn't authenticated then they have no access to that route.
@MnkyArtss
@MnkyArtss 10 ай бұрын
Great tutorial but the zoom is kind of annoying
@brettwestwooddeveloper
@brettwestwooddeveloper 9 ай бұрын
Thanks for tuning in and I will take that into account. I had a feeling it might be
@SamTipton
@SamTipton 6 ай бұрын
It's odd that the User model does not contain a password field, but you pull it out in authorize no problem. I'm using mongodb adapter, there is no schema configuration provided in the docs and authorize is not happy with the user type I'm trying to return from authorize.
@shtse8
@shtse8 6 ай бұрын
Are you hashing the password at server side? Shouldn't we hash at client side before sending the password to server to secure users?
@brettwestwooddeveloper
@brettwestwooddeveloper 5 ай бұрын
Password hashing client side offers no advantage against adversarial attackers. So, hashing it on the server is good enough!
@user-mn4zo4yl8u
@user-mn4zo4yl8u Жыл бұрын
where are source code brother?
@sunilmaurya6594
@sunilmaurya6594 8 ай бұрын
I did the same step but when im going to login it redirected to me "/api/auth/error" can anyone tell why this is happening?
@brettwestwooddeveloper
@brettwestwooddeveloper 8 ай бұрын
I would have to see your code. Could be for a few reasons
@Robert-jt9yg
@Robert-jt9yg 9 ай бұрын
If I have a express.js backend where I have setup a MySQL database with Sequelize, and i have a next.js frontend, how could I make it work with NextAuth?
@brettwestwooddeveloper
@brettwestwooddeveloper 8 ай бұрын
Never have tried that so don't want to give you wrong advice.
@alvinjulian334
@alvinjulian334 2 ай бұрын
I got an error 401 Credentials Sign in Not Supported, why is that??
@brettwestwooddeveloper
@brettwestwooddeveloper Ай бұрын
Could be multiple reasons but a 401 error code means that you are unauthorized to perform that certain action. Were you able to fix it since your comment?
@aryaprima6626
@aryaprima6626 Жыл бұрын
can i try this with sql?, this tutorial is very useful, and i am very happy, after few days studying about credentials
@janpawedwa4590
@janpawedwa4590 Жыл бұрын
You set the session as a required prop on the Provider, but when wrapping the body with it, you never pass that prop. How does that work?
@brettwestwooddeveloper
@brettwestwooddeveloper Жыл бұрын
i don't know how it did but it did
@kosglu8705
@kosglu8705 6 ай бұрын
@@brettwestwooddeveloper A quote from the documentation: "If you pass the session page prop to the - as in the example above - you can avoid checking the session twice on pages that support both server and client side rendering."
@amelianceskymusic
@amelianceskymusic 9 ай бұрын
I've got an error, does anyone have any solutions?: PrismaClientInitializationError: Invalid `prisma.user.findUnique()` invocation: Error in connector: Error creating a database connection. (Kind: An error occurred during DNS resolution: proto error: io error: A socket operation was attempted to an unreachable network. (os error 10051), labels: {})
@brettwestwooddeveloper
@brettwestwooddeveloper 9 ай бұрын
did you run npx prisma generate?
@AustrianTutorialHD
@AustrianTutorialHD Жыл бұрын
and how do I give the users feedback for example if they want to login to their account but used the wrong password?
@brettwestwooddeveloper
@brettwestwooddeveloper Жыл бұрын
I have the next auth ultimate guide which I go over how to use toast notifications. Skip to that time frame in that video. It has a red thumbnail on my channel
@marcelinoborges5088
@marcelinoborges5088 8 ай бұрын
Where is the setup for redirecting the user to the dashboard after successful login?
@storyPlus12
@storyPlus12 9 ай бұрын
why you didnt add the middleware?
@brettwestwooddeveloper
@brettwestwooddeveloper 9 ай бұрын
what middleware?
@storyPlus12
@storyPlus12 9 ай бұрын
@@brettwestwooddeveloper Protect the routes
@brettwestwooddeveloper
@brettwestwooddeveloper 9 ай бұрын
yea that's very simple to do, just didn't do it in this tutorial@@storyPlus12
@deepyslow
@deepyslow Жыл бұрын
How is the registerUser function connected to the api route? The response variable hold the fetch info etc but its never used anywhere? Apart from console logging userInfo? Or am I missing something?
@brettwestwooddeveloper
@brettwestwooddeveloper Жыл бұрын
register function send information to /api/route endpoint and this creates a user in the database. Then the catch all next auth route gets the user from the register by looking up the user in the database.
@Sk8nRock
@Sk8nRock 7 ай бұрын
Trying to implement this, but using a MySQL database. However it seems that next-auth doesn't support the database strategy and only works with JWT when using the credentials provider, so every time I login it tries to fetch the user session from the database, but the sessions table is always empty. If I remove the adapter altogether everything works, but I guess then there is no place to save the registered users...
@thomasfrimpong6636
@thomasfrimpong6636 Жыл бұрын
God bless you for this work. i expected logout any way.
@brettwestwooddeveloper
@brettwestwooddeveloper Жыл бұрын
Thank you and signout() with an OnClick
@kludzidula1219
@kludzidula1219 5 ай бұрын
I followed your steps but It didn't work maybe because of the versions what version of next js and auth did you use?
@Mike-ks7nr
@Mike-ks7nr Жыл бұрын
This almost worked until I got to login. it doesn't print the session to the console or the dashboard.
@brettwestwooddeveloper
@brettwestwooddeveloper Жыл бұрын
It should work, there must be something wrong in your code
@Mike-ks7nr
@Mike-ks7nr Жыл бұрын
@@brettwestwooddeveloper I agree with you 100%, but I’ve watched so many tutorials and I’ve rewatched this video and your other videos and some others as well, but for some reason whenever I go to log in I run into a problem. If I go to “localhost:3000/api/auth/signin” and log in with valid credentials it always gives me an error at the top of the form. Can’t figure it out for the life of me but I’ll keep trying. I have to be messing up somewhere.
@Mike-ks7nr
@Mike-ks7nr 10 ай бұрын
@kristielebaron-cz4fw no:( I watched a few other tutorials and kept getting the same problem. I tried following this one again from the beginning a few times to be sure I didn’t do something wrong but still had the same issue.
@tomryanxx
@tomryanxx Ай бұрын
can't handle hearing "prism" instead of "prisma" ever few seconds arrrggh
@brettwestwooddeveloper
@brettwestwooddeveloper Ай бұрын
Sorry bro I don’t think my content is for you then
@MrCowch
@MrCowch 10 ай бұрын
i followed your guide to a t and love it i dont really want to learn type script yet..... but i when i try to sign in i have to do it twice in order to get signed in.. did i miss something in this one or your other jwt video ? no errors just have to sign in twice. incase someone else runs across this i spent longer on this and found my issue was i was redirecting the same time i was signing in i put await in front of sign in and it solved my issue
@shanemur
@shanemur 10 ай бұрын
No Sign out functionality!!! therefore what is the point!
@brettwestwooddeveloper
@brettwestwooddeveloper 10 ай бұрын
you can just import signOut() from next-auth and then add it to an onClick.
@warriorking778
@warriorking778 11 ай бұрын
! important How to implement role based redirect. eg. for user has "/user" and for admin has "/admin". When I signin successfully then it will automatically redirect.
@ojal_sharnagat
@ojal_sharnagat 8 ай бұрын
How to do server side pagination by just fetching data from an API (without using MongoDB )? Please help! I'm stuck in the middle of a project.
@gildsonalves6762
@gildsonalves6762 11 ай бұрын
Hi, great job! Some questions... How about persist token to client and use it in API requests? How to refresh token too and use this solution with a google provider and still use a valid token to make requests, for example?
@ricardocastle6462
@ricardocastle6462 11 ай бұрын
On Google Provider, you can write this code: authorization: { params: { prompt: "consent", access_type: "offline", response_type: "code", } } This will force the refresh token.
@jonathanpodvin5727
@jonathanpodvin5727 6 ай бұрын
Hey guys, is it possible to have in the first time a credential account and later connect with our google account with the same email than credential email ?
@mubashirwaheed474
@mubashirwaheed474 10 ай бұрын
Hello Brett is it possible to redirect the user to the `onboarding` page after signup and the user doesn't have to login when using credential provider?
@brettwestwooddeveloper
@brettwestwooddeveloper 9 ай бұрын
yes add a redirect('/onboarding) after the signIn function
@israelalfaro3621
@israelalfaro3621 3 ай бұрын
the props session when you pass the value to the provider in layout.js?
@moodymshana6513
@moodymshana6513 28 күн бұрын
Where is the Id of that user and other important details of him
@nasarullahkhan3379
@nasarullahkhan3379 Жыл бұрын
You already made the same video (The Ultimate Guide to Next Auth - Everything You Need).
@arProject.webdev
@arProject.webdev 11 ай бұрын
Quick question from newbie developer. At 46:45 when you marking 'use client' on Provider, and import it on root layout.js, is it the same as marking ALL child of this provider component (which is basically all of app pages) to be a client rendering? I can't wrap my head around this.
@jotaroisdarius1918
@jotaroisdarius1918 10 ай бұрын
nope they don't all become client components
@pulpxi
@pulpxi 7 ай бұрын
thanks for clarifing i was also wondering xD @@jotaroisdarius1918
@user-rs2ym6sb9t
@user-rs2ym6sb9t 11 ай бұрын
As `bcrypt` is not available on Edge runtime, how do I need to encrypt passwords?
@golodiassaid4879
@golodiassaid4879 10 ай бұрын
Great tutorial than you, but why username instead of email? How do you handle if you want email login and for example google and facebook? Thank you
@shanemur
@shanemur 10 ай бұрын
Brett keeps deleting my comment so I'll keep writing it. If you're here in believe that this is a solid tutorial on Next auth, this ain't!!! Brett solution is utter rubbish!! I've recreated he's solution only to find zero authentication happening, users can access the dashboard page by localhost:300/dashboard WITHOUT NEVER logging in!!! users can login with any email or password without NEVER registering that user. He's solution is a complete joke. Don't waste your time here I like, there is ZERO authentication happening with he's tutorial!!!
@devs_nazmul
@devs_nazmul Жыл бұрын
Does the NextAuth Provide any JWT , your server doesn't send that token though?
@sulavbaral9972
@sulavbaral9972 11 ай бұрын
how shall we structure the database if we need both oauth and credential login
@snoopytoon2589
@snoopytoon2589 Жыл бұрын
can someone help me with displaying the last login time along with the user-name when user's login
@phipattanachairinfong3503
@phipattanachairinfong3503 11 ай бұрын
Where is the register code? Why can't I find it?
@lucasgonzalez8313
@lucasgonzalez8313 Жыл бұрын
Hey ! can you help me with this error please? Type 'import("c:/Users/Lucas/Desktop/Nueva carpeta/login-app/node_modules/@auth/core/adapters").Adapter' is not assignable to type 'import("c:/Users/Lucas/Desktop/Nueva carpeta/login-app/node_modules/next-auth/adapters").Adapter'. Types of property 'createUser' are incompatible. Type '((user: Omit) => Awaitable) | undefined' is not assignable to type '(user: Omit) => Awaitable'. Type 'undefined' is not assignable to type '(user: Omit) => Awaitable'. In the code marks adapter an throw that error
@brettwestwooddeveloper
@brettwestwooddeveloper Жыл бұрын
are you using typescript?
@lucasgonzalez8313
@lucasgonzalez8313 Жыл бұрын
@@brettwestwooddeveloper yep, I'm using typescript. did I miss something?
@kylelogue9408
@kylelogue9408 Жыл бұрын
You have to`import type { Adapter } from 'next-auth/adapters'` and then change your adapter line to `adapter: PrismaAdapter(prisma) as Adapter`
@kolegakrzys5190
@kolegakrzys5190 Жыл бұрын
import { PrismaAdapter } from "@next-auth/prisma-adapter"; this should work fine
@markuscwatson
@markuscwatson 7 ай бұрын
prisma, not prism
@aymanechaaba
@aymanechaaba 11 ай бұрын
is it possible to implement this using server actions?
@brettwestwooddeveloper
@brettwestwooddeveloper 11 ай бұрын
Never tried with server actions, so I honestly don't know 100%
@armant11
@armant11 6 ай бұрын
PRIS......MA!!!😂😂😂😂😂😂
@nasarullahkhan3379
@nasarullahkhan3379 Жыл бұрын
Please add forgot password. Its essential part of login. I don't know why people ignore it.
@MoonMoon-qt7io
@MoonMoon-qt7io 11 ай бұрын
use ts ?🤔
@jonkerkoorts6265
@jonkerkoorts6265 Жыл бұрын
Is it possible to share the github repo with us? 😃
@NatnaelAbebe-og8bt
@NatnaelAbebe-og8bt Жыл бұрын
bro if I start learning web development to day is it worth or can I get a job please help me
@speedster784
@speedster784 Жыл бұрын
It will take time to get a job
@kylelogue9408
@kylelogue9408 Жыл бұрын
If you start today, you're already behind, but keep learning and you'll eventually get there. How motivated are you?
@speedster784
@speedster784 Жыл бұрын
Bro you keep saying prism when its actually pris-ma. Great video though
@brettwestwooddeveloper
@brettwestwooddeveloper Жыл бұрын
speech impediment I guess
@kylelogue9408
@kylelogue9408 Жыл бұрын
I was thinking the same thing :)
@NOT_TON_Fan
@NOT_TON_Fan Жыл бұрын
T3 STACK FULL COURSE
@NOT_TON_Fan
@NOT_TON_Fan Жыл бұрын
Needed
@razac_zr
@razac_zr 11 ай бұрын
Nice video
@brettwestwooddeveloper
@brettwestwooddeveloper 11 ай бұрын
Thank you!
@Gabriel-ue3jf
@Gabriel-ue3jf 11 ай бұрын
I tried to implement this but it doesn't create a session-token in the browser. It only works with the /api/auth/signIn default page but with /my-login it won't create that session. I even have pages: { signIn: '/my-login', },
@brettwestwooddeveloper
@brettwestwooddeveloper 11 ай бұрын
Hi, can you show me the code so I can help you out
@Gabriel-ue3jf
@Gabriel-ue3jf 11 ай бұрын
@@brettwestwooddeveloper the problem strangely was caused by the name of the provider. Initially I named it name: "classic". After I changed it to name: "credential" and also added id: "credential", it started to work just fine. I don't have an explanation
Next Auth - JWT & Session Callback & How to Update User Session
31:34
Brett Westwood - Software Engineer
Рет қаралды 46 М.
👨‍🔧📐
00:43
Kan Andrey
Рет қаралды 10 МЛН
Get 10 Mega Boxes OR 60 Starr Drops!!
01:39
Brawl Stars
Рет қаралды 16 МЛН
The Joker saves Harley Quinn from drowning!#joker  #shorts
00:34
Untitled Joker
Рет қаралды 64 МЛН
Next Auth v5 Complete Guide in Next.js 15 with Prisma and MongoDB
1:22:52
Programming with Umair
Рет қаралды 7 М.
The Ultimate Guide to Next Auth - Everything You Need
1:36:26
Brett Westwood - Software Engineer
Рет қаралды 57 М.
NextJS 13. Аутентификация и приватные роуты
33:59
Михаил Непомнящий
Рет қаралды 45 М.
I Never Want To Build Authentication Any Other Way
2:03:20
Elliott Chong
Рет қаралды 19 М.
Comprehensive Authentication Tutorial in Next.js 14
3:25:43
Sakura Dev
Рет қаралды 34 М.
👨‍🔧📐
00:43
Kan Andrey
Рет қаралды 10 МЛН