Build a Complete Sign-Up and Sign-In with Next.js, NextAuth, PostgreSQL, and Prisma

  Рет қаралды 67,168

Cand Dev

Cand Dev

Күн бұрын

In this tutorial, we'll set up Prisma within a Next.js app router and link it to a PostgreSQL database using Supabase. When users register, we'll save their data securely in the Supabase database. For login authentication, we'll use the next-auth package for email and password verification, and we'll also employ bcrypt to protect passwords by converting them into a hashed format before storing them in the database. Additionally, we'll create a custom sign-in page for a personalized touch. Along the way, you'll also learn how to add data into sessions.
👨‍💻Starter Code:
github.com/candraKriswinarto/...
🔗Source:
[supabase] supabase.com/
[prisma.io] www.prisma.io/
[posgresql] www.postgresql.org/
[instantiating PrismaClient] www.prisma.io/docs/guides/oth...
[next-auth] next-auth.js.org/getting-star...
[bcrypt] www.npmjs.com/package/bcrypt
[prisma-adapter] www.npmjs.com/package/@next-a...
👉Timestamps:
0:00 - Intro
01:50 - Install and Setup Prisma
03:38 - Setup PostgreSQL on Supabase
05:35 - Create Prisma Model Schema
08:11 - Install Prisma Client
10:50 - Create Register User API
16:55 - Install bcrypt to encrypt the password
19:33 - Register New User with Postman
22:36 - Validate Register API use zod
24:07 - Api integration Sign-Up
28:58 - Install and Setup Next-Auth
29:27 - Create Sign-In route
3:50 - Create Custom Sign-in page
35:05 - Install and Setup Prisma Adapter
36:18 - Authorize function
39:46 - Sign-in with credentials when submit form
46:12 - Get Session on Server Component
48:14 - Add username in to Session Object
55:53 - Create Sign-Out Button on Navbar
01:01:34 - Add Toast Notification
01:05:57 - Get Session on the Client Component
01:12:20 - Get Session on API Route
🌎 Find Me Here:
Instagram : / candra_kriswinarto
GitHub: github.com/candraKriswinarto/
Linkedin: / candra-kriswinarto
#programming

Пікірлер: 148
@ozgursar5386
@ozgursar5386 8 ай бұрын
I think this is one of the most comprehensive tutorials that guides how to implement credentials provider using Prisma. Thank you!
@foxhunt9305
@foxhunt9305 8 ай бұрын
Great Video! I am a React developer and I just started messing around with Next.js and this project really helped me gain valuable knowledge about how Next.js works and the different tools available in the framework. One tip though: for security reasons it is better to have the id in the prisma model as a string and then set the default to uuid(), that way even if you dont have route protection someone cant just change the end of the route from number 1 to 2 for example and log in as the admin. instead the route will have something like this: 8624d47d-ceb0-4288-bd0a-876bb68985f0. which is a universally unique identifier that once generated can never be re-created so there is no chance of route manipulation in that way
@cyrusrohail9243
@cyrusrohail9243 7 ай бұрын
I looked up multiple tutorials. Only yours seemed to help me out of this hell hole called next-auth. Thank you!
@lydiabylicka4175
@lydiabylicka4175 Ай бұрын
I am halfway through the tutorial, encountered many errors (not the creator's fault - updates, installation, etc.) and I can say with certainty this is one of those tutorials I really want to follow through, it is so informative and just MAKES SENSE! Big kudos to you, @Cand Dev :)
@gubatenkov
@gubatenkov 6 ай бұрын
Dude, this is the only one usefull tutorial about next-auth with prisma db, that i found on the internet !! Keep doing what you do
@assad.rajab-2
@assad.rajab-2 21 күн бұрын
Yeah, litterly i have been searching for long time and i did not find anything, yet by accident i discovered this tutorial.
@loggerino7331
@loggerino7331 3 ай бұрын
Great video dude. Your video is straight to the point unlike other youtubers who pad out their tutorials with unnecessary CSS stylings.
@pomiusu
@pomiusu 2 ай бұрын
this is the best nextjs tutorial I've seen, I always find difficult on following tutorials but this is the first that really helped me and I learned a lot of useful things, great work and nice didactic!!
@Ms_Mariga
@Ms_Mariga 7 ай бұрын
Love Love Love this video. So simple and very informative. I followed along and learnt a lot. Thank you for this 😊..... Now the "Like so" is stuck to my head 😅
@assad.rajab-2
@assad.rajab-2 21 күн бұрын
Thank you very much, I have been looking for a long time for a tutorial that shows how to really create such a system with usernames and passwords. I even stopped a project because I couldn't find a solution for it. Now I have my passion back thanks to you.
@CandDev
@CandDev 6 күн бұрын
Let's get back to coding 🧑🏻‍💻. Thanks for the tip
@Ecki107
@Ecki107 4 ай бұрын
The redirect after login at 43:00 can now also be implemented directly in the signIn-call. Just set redirect: true and provide a callbackUrl to which to redirect the user to.
@muhammedgulcu
@muhammedgulcu 9 ай бұрын
You know how to write code very well and you explain it. Thank you very much 😎🙌👌
@atifwattoo1719
@atifwattoo1719 2 ай бұрын
That is the best tutorial on KZbin, related to authentication in Nextjs. Bro,, please make a complete course related to Nextjs in detail
@OnlyJavascript
@OnlyJavascript 9 ай бұрын
awesome. subbed. please continue this series. like role based auth. email verification. forget and reset password.
@user-ev4sq2io1c
@user-ev4sq2io1c 6 ай бұрын
Too good to believe, session are being introduced so well, why such good youtuber only have few people watch, what a lost for them.
@Furki4_4
@Furki4_4 6 ай бұрын
Thank you Cand! I was struggling to extend the session user data and i got the solution.
@mounir101
@mounir101 7 ай бұрын
Amazing video! all your videos are amazing and this one is clearly seen at another level. Thank u bro so much for charing.
@Noe_Sourdes
@Noe_Sourdes 5 ай бұрын
Have you released the next part of this series, incorporating Google authentication implementation? The series has been excellent so far! :)
@dalestewart
@dalestewart 9 ай бұрын
Another professional tutorial!👍
@user-bv5ne5sj5i
@user-bv5ne5sj5i 9 ай бұрын
This actually is awesome. you make it so simple Thank you. I would love you to make another video on role based access on top of this. 👌
@CandDev
@CandDev 9 ай бұрын
Thanks 🤍
@kokusei9211
@kokusei9211 8 ай бұрын
awesome tutorial very complete and easy to understand
@nikhilsharma2421
@nikhilsharma2421 5 ай бұрын
Sir, this tutorial was really helpful you covered all the points. One more thing, I want to ask you can you please make a tutorial in which you're using both the credentials provider and also the google provider together. You can make that video in continue to this playlist.
@preciousnwaoha3123
@preciousnwaoha3123 9 күн бұрын
I cannot remember any other coding tutorial that was as well done in terms of following up as this one. And I have been on this for years.
@sebastiancastillo3560
@sebastiancastillo3560 9 ай бұрын
Amazing tutorial!! thanks so much🤩!
@thebeep4427
@thebeep4427 9 ай бұрын
Sub so fast , great videos series bro , thank you so much !
@CandDev
@CandDev 9 ай бұрын
Thanks for the sub! 🤍
@brandonbailey4491
@brandonbailey4491 9 ай бұрын
so what we if want to use a genuine backend for this instead? do we still need to use the next /api approach and then reach out to our api from there or can we just use fetch and session tokens in components?
@Amitsarker
@Amitsarker 6 ай бұрын
Excellent tutorial! Thank you
@echovisionlab
@echovisionlab 7 ай бұрын
Great tutorial, inspired me a lot for making a tutorial.. :)
@mahmoodalfayoumi3429
@mahmoodalfayoumi3429 7 ай бұрын
Great video! I was wondering if you had any idea how to make this expandable for multiple different logins. I am working on having two login pages with seperate admin pages, storing sign up data in two different prisma tables and using those to sign in. I managed to get the sign up post request to work, but my sign-in to redirect to the new admin page is causing me trouble that routes to me an error page. Any ideas?
@nizomsidiq3
@nizomsidiq3 8 ай бұрын
Thanks for the video! but how to implement throttling in the register API? and how to guard the pages to always redirect to login if user is unauthenticated?
@nobody2937
@nobody2937 9 ай бұрын
Detailed and clear explaination...
@lorashine
@lorashine 5 ай бұрын
"Fantastic! This video is like discovering a treasure trove. It's filled with invaluable insights. I'm convinced he's the best lecturer I've ever come across. Thank you so much. Your assistance has been instrumental in helping me create a practical, real-world product.
@Colt-tr6ec
@Colt-tr6ec 7 ай бұрын
amazing tutorial. Thank you!
@MusangamfuraEmmanuel-rx3jr
@MusangamfuraEmmanuel-rx3jr 5 ай бұрын
Exactly what I was looking for🎉
@Glissadist
@Glissadist 7 ай бұрын
This series is awesome.
@DoSmth
@DoSmth 7 ай бұрын
Thanks a lot! And how we can use API session? In others api`s reqests?
@nguyenat6454
@nguyenat6454 9 ай бұрын
i really love how you give me the folder template to code and how you explain really really love the video. i hope u will make more videos about tricks and nextjs project 😊😊
@CandDev
@CandDev 9 ай бұрын
and i hope you always support me, with like and comment 😁
@nguyenat6454
@nguyenat6454 9 ай бұрын
@@CandDev i hope you will make a project with nextauth and other technologies ❤❤
@Thikondrius
@Thikondrius 8 ай бұрын
Thank you for the video :) Can I ask where we can find the repo will the full code please ?
@dalestewart
@dalestewart 9 ай бұрын
I love using PostgreSQL and Prisma
@bilalfaisalshaikh9165
@bilalfaisalshaikh9165 Ай бұрын
thanks a lot for this tutorial
@davidabolade4708
@davidabolade4708 Ай бұрын
Brilliant, just brilliant
@fernandocosta3307
@fernandocosta3307 Ай бұрын
Thank you man. I'm from 🇧🇷
@CandDev
@CandDev 6 күн бұрын
Olá, Brasil 👋🏻
@alibabadulan9911
@alibabadulan9911 7 ай бұрын
I wonder if you have any tutor with progress bar with shadcn ui in future?
@user-oq3wt9rz8h
@user-oq3wt9rz8h 2 ай бұрын
Is this example basically safe to use in real website (with some additions)?
@MustafaHasanKhan
@MustafaHasanKhan 9 ай бұрын
Hey, can you please give the final code Github repo. Thanks.
@leesheppard7524
@leesheppard7524 2 ай бұрын
Thanks for the video!
@matiasleal7323
@matiasleal7323 7 ай бұрын
github whit final code please
@codestudio497
@codestudio497 7 ай бұрын
thank you , eveything is cool , but in my vscode everything is broken even the next auth page is updated , i can't get the default sign in page
@ichigokuro3986
@ichigokuro3986 6 ай бұрын
itsthe final code available? my signIn() doesnt seem to execute the autorize function and i have no idea what im doing wrong. great tutorial btw!
@georgelopez6557
@georgelopez6557 6 ай бұрын
Have you released the next part to this series, implementing google auth? Great series so far! :)
@CandDev
@CandDev 6 ай бұрын
I have already uploaded that, but KZbin just deleted that video 😥.
@jami4588
@jami4588 6 ай бұрын
@@CandDev upload it again we really need it
@UdaySagar
@UdaySagar 5 ай бұрын
@@CandDev can u pls try to upload the same video again ?
@unlucky_coder8983
@unlucky_coder8983 5 ай бұрын
Excellent tutorial, dude..! But, is there a tip to make this role based authentication? Btw don't forget to post nextauth authentication using google credentials.. 😊
@someoneelse4195
@someoneelse4195 9 ай бұрын
After how much time a session is expired and can we manually set an expiry for session
@adheichsan
@adheichsan 6 ай бұрын
I have an error in production mode in the sign out section, because when I click sign out, it still calls localhost, how can I make it not localhost anymore? 🙏🙏🙏🙏🙏
@tomich20
@tomich20 5 ай бұрын
good video, it would be awesome if you create another branch on your project witht he final code!
@abylaikhanbaidullayev743
@abylaikhanbaidullayev743 7 ай бұрын
Thank you for content, could you please explain where are you using "export const authOptions: NextAuthOptions"? I can't find it where are you using
@CandDev
@CandDev 7 ай бұрын
i use that on my [...nextauth].js, app/page.tsx, navbar, and many more.
@amar5751
@amar5751 7 ай бұрын
Hi can you add remember me functionality where my credentials Store in local storage and password should be encrypted...
@adelmae9037
@adelmae9037 2 ай бұрын
you did not include the api/ folders in your github repo why is that ?
@Usq7213
@Usq7213 8 ай бұрын
was very very happy until there was no source code in description... your provide it in other videos, please put it, awesome content
@mendaxassange4465
@mendaxassange4465 5 ай бұрын
can we have a video showing login + google auth + 2factor auth at the same time...?
@ilahazs
@ilahazs 5 ай бұрын
Terimakasih bro ilmunya
@CandDev
@CandDev 5 ай бұрын
makasih juga bro udah mampir
@AkashLayal
@AkashLayal 9 ай бұрын
Can we host this on hostinger premium webhosting
@abaydotdev
@abaydotdev 5 ай бұрын
great video mate!
@ImamNurArifinHA
@ImamNurArifinHA 9 ай бұрын
nicee tutorial 👍
@gaminghub600
@gaminghub600 8 ай бұрын
Can I use Next Auth in React Native Android Application??
@justin9494
@justin9494 9 ай бұрын
you're much better than lamadev
@wowwolif9380
@wowwolif9380 7 ай бұрын
I am new with both channels, but in which way he's better if you can explain
@bale_1696
@bale_1696 8 ай бұрын
Thanks you!!!!
@nomxxn
@nomxxn 6 ай бұрын
I dont get it, when did you create the forms and ui lmao, am i meant to create my own form or?
@kitebeachinnbeachinn2888
@kitebeachinnbeachinn2888 10 ай бұрын
Awesome mate!
@xijicaijing
@xijicaijing 4 ай бұрын
Why the GitHub Repo codes not completly ?
@Engineer6nine
@Engineer6nine 3 ай бұрын
I am not able to singin.. it is redirecting me back to the home page.. Showing warning about NEXTAUTH_URL and NEXTAUTH_SECRETKEY... someone please help
@desuchanz4956
@desuchanz4956 8 ай бұрын
stuck in signin authentication it says bad request
@tnktaliaba2994
@tnktaliaba2994 7 ай бұрын
Can you update your source code please? there is no api folder and prisma folder. Just only forms?!
@lucasgonzalez8313
@lucasgonzalez8313 9 ай бұрын
Hey bro! nice tutorial! I'm stuck with the signIn part, because I'm having an issue after submit it redirect to /api/auth/error. Can you please help me with that? thanks :)
@Usq7213
@Usq7213 8 ай бұрын
did you solve it i have the same issue and are desperate to solve it
@Usq7213
@Usq7213 8 ай бұрын
I solve the redirect issue by chainging to the following code: " const signInData = await signIn("credentials", { email: values.email, password: values.password, redirect: false, }); " in the signInForm.tsx file
@Usq7213
@Usq7213 8 ай бұрын
+ other thing just look for my comment in the comment section of the video
@yoggyprastya
@yoggyprastya 5 ай бұрын
dude, how to implement this code for rest-api ?... regards..
@amannambisan6870
@amannambisan6870 7 ай бұрын
Great video!
@vitya.obolonsky
@vitya.obolonsky 7 ай бұрын
Next-auth does not work with custom forms
@amogelangmoatswi1918
@amogelangmoatswi1918 7 ай бұрын
am stuck at 44:51.. It doesn't redirect me to the Admin page even when the credentials are correct. please help
@user-yo9eu5wg9n
@user-yo9eu5wg9n 7 ай бұрын
я так сделал: auth.ts export const authOptions: NextAuthOptions = { adapter: PrismaAdapter(prisma), session: { strategy: 'jwt' }, pages: { signIn: "/sign-in" }, providers: [ CredentialsProvider({ name: "Credentials", credentials: { email: { label: "Email", type: "email", placeholder: "jsmith" }, password: { label: "Password", type: "password" } }, async authorize(credentials) { if (!credentials?.email || !credentials?.password) { return null } const existingUser = await prisma.user.findUnique({ where: { email: credentials?.email } }) if (!existingUser) { return null } const passwordMatch = await compare(credentials.password, existingUser.password) if(!passwordMatch){ return null } return { id: `${existingUser.id}`, username: existingUser.username, email: existingUser.email } } }) ], callbacks: { session: ({ session, token }) => { console.log("Session Callback", { session, token }); return { ...session, user: { ...session.user, id: token.id, randomKey: token.randomKey, }, }; }, jwt: ({ token, user }) => { console.log("JWT Callback", { token, user }); if (user) { const u = user as unknown as any; return { ...token, id: u.id, randomKey: u.randomKey, }; } return token; }, }, }
@omalaydrinks1847
@omalaydrinks1847 7 ай бұрын
You are not alone. If you have solved it, let me know what you did to solve this problem.
@odogru77
@odogru77 7 ай бұрын
When I try to Login with the account I signed up for, I can't continue due to a 401 unauthorized error in the console. I guess it depends on the Credentials provider.
@user-yo9eu5wg9n
@user-yo9eu5wg9n 7 ай бұрын
я так сделал: в файл auth.ts добавил callback ], callbacks: { session: ({ session, token }) => { console.log("Session Callback", { session, token }); return { ...session, user: { ...session.user, id: token.id, randomKey: token.randomKey, }, }; }, jwt: ({ token, user }) => { console.log("JWT Callback", { token, user }); if (user) { const u = user as unknown as any; return { ...token, id: u.id, randomKey: u.randomKey, }; } return token; }, }, }
@AmanKumar-eg5rc
@AmanKumar-eg5rc 8 ай бұрын
In next js 13 app directory next auth we can not authenticate user without using prisma?
@CandDev
@CandDev 8 ай бұрын
Yes, of course
@Grishopping
@Grishopping 9 ай бұрын
discord ???? You won a new subscriber from Venezuela.... my English is bad but you explain very well.... I'm understanding Att. Jose Grillo
@CandDev
@CandDev 9 ай бұрын
Thank you, my English is also not very good 😁, happy coding 👋🏻
@qwertyzxvf6561
@qwertyzxvf6561 5 ай бұрын
amazing video!
@joan.paucar
@joan.paucar Ай бұрын
So useful bruh
@aguud
@aguud 5 ай бұрын
nice video
@andrsh9388
@andrsh9388 9 ай бұрын
Good❤
@ELMlKO
@ELMlKO 9 ай бұрын
at 43:17 when I click login it logs undefined and reloads even after I put redirect false and preventDefault
@samuelpalacios9661
@samuelpalacios9661 8 ай бұрын
x2
@samuelpalacios9661
@samuelpalacios9661 8 ай бұрын
Hey, I fixed it, i added the session provider hook from next-auth on the layout.tsx, also i add an try/catch block on the authorize in the authOptions
@codewithhaider7190
@codewithhaider7190 7 ай бұрын
@@samuelpalacios9661 can you share the code i facing same issue
@omalaydrinks1847
@omalaydrinks1847 7 ай бұрын
Is there any one who had challenge moving pass 44:56 - getting to admin page. If you did, i would like to know why it happened and how to solved it
@Jdsg1234
@Jdsg1234 7 ай бұрын
Yes, add the following lines of code: In the SignInForm.tsx file, add a 'redirect: false' in the onSubmit function: so it would look like this: const onSubmit = async (values: z.infer) => { const signInData = await signIn("credentials", { email: values.email, password: values.password, redirect: false, }); if (signInData?.error) { console.log("error----", signInData.error); } else { router.push("/admin"); } };
@HadrianiOfficial
@HadrianiOfficial 6 ай бұрын
I tried myself as well, it does redirect me to the admin page, but it stays for 1 second and then it re-routes me back to the sign-in page. Putting the redirect: false, it will end up remaining on the sign in page, it doesn't lead me at all to the admin page. My issue is that on Application/Cookies, I don't get the "session" next-auth cookie....I only have the callback and the csrf-token@@Jdsg1234
@harmiklathiya3625
@harmiklathiya3625 2 ай бұрын
Where is the Signup flow ?
@muhardinhasim
@muhardinhasim 9 ай бұрын
kalau error Unexpected token } in JSON at position 121 kenapa ya ? padahal kodingnya secara step by step udah sama, udah coba search juga katanya minta downgrade efect di windows tapi coba di linux juga sama kenapa ya ?
@muhardinhasim
@muhardinhasim 9 ай бұрын
btw, aq kira bule, english keren hahaha
@CandDev
@CandDev 9 ай бұрын
kemungkinan penempatan kurung kurawal yg salah, atau hilang.
@CandDev
@CandDev 9 ай бұрын
masih belibet bro hahaha
@muhardinhasim
@muhardinhasim 9 ай бұрын
udah bisa thanks
@jami4588
@jami4588 6 ай бұрын
i cant configure the nextauth credentials provider i tried everything but i am failing again and again even though i am correctly returning the user inside authorize and also i gave made my submit function correct everything is correct i dont know why is it still undefined the result that signIn is givng undefined always i do not know why is that happeing wasted ours in it searched it everywhere i logged the values of my email and pass that was correct but result from sign in is undeifned PLEASE HELP
@CandDev
@CandDev 6 ай бұрын
Please send me your code, and I will check it.
@TheMorizzy
@TheMorizzy 5 ай бұрын
I had this same issue, try adding redirect: false to the object in the signIn function
@zuriagainigo7401
@zuriagainigo7401 5 ай бұрын
Did you manage to fix it?
@doavers
@doavers 5 ай бұрын
Halo bang Cand. This is realy great tutorial. I watch the whole video but still got some issue. Can you please share the final code to us? Thank you.. Mantap tutorialnya. Cuma ada issue ketika masuk ke halaman register kena redirect. Bisa minta final codenya bang.. Terima kasih.
@ruuma1074
@ruuma1074 7 ай бұрын
3:32 itu pake apa bang? postgre gw ga kek gitu, apa karena mac?
@CandDev
@CandDev 7 ай бұрын
iya, beda tampilan aja kayaknya. aku gak pernah coba juga sih tampilan selain di mac.
@diogomaia6636
@diogomaia6636 8 ай бұрын
I'm getting a "Warning: Prop `htmlFor` did not match. Server: ":R2irb6qcq:-form-item" Client: ":Rabdcr9j9:-form-item" error when trying to log in. Tried to debug it but can't find the issue. Any help? ^^'
@Usq7213
@Usq7213 8 ай бұрын
got the same did you solve?
@lxespadatv2342
@lxespadatv2342 7 ай бұрын
this htmlFor is just a warning from 1 of the shadcn components hes using in the starter template.. but i dont think thats causing your login error.. u manage to fix the error?
@Usq7213
@Usq7213 7 ай бұрын
@@lxespadatv2342 took some time but manage to fix it actually :)
@Usq7213
@Usq7213 7 ай бұрын
to fix this warning just look for my comment somewhere in the comments section, I think it was that you need to update nextjs & eslint
@Kushal015
@Kushal015 8 ай бұрын
I have tried twice my code is showing internal server error 500 can any one help me with it
@sifact1391
@sifact1391 8 ай бұрын
restart your local server
@DeveloperMan_
@DeveloperMan_ 2 ай бұрын
this is the type of youtubers i hide from my friends lol like hiding good shows
@dailag19
@dailag19 6 ай бұрын
thank you on palestine and on Egypt
@doob50
@doob50 23 күн бұрын
21:32
@Usq7213
@Usq7213 8 ай бұрын
got the same issue as the others mention in the comment "Warning: Prop `htmlFor` did not match. Server: ":R2irb6qcq:-form-item" Client: ":Rabdcr9j9:-form-item" it happen in sign-in part 41:53, please help us there are many others that has the same problem, the best solution would be that you provide the source code as mentioned before
@Usq7213
@Usq7213 8 ай бұрын
I think i solve that part by changing the SignInForm.tsx as in the following lines of code into: const signInData = await signIn("credentials", { email: values.email, password: values.password, redirect: false, });
@Usq7213
@Usq7213 8 ай бұрын
The issue of "Warning: Prop `htmlFor` did not match. Server: ":R2irb6qcq:-form-item" is because of that you need to update eslint & nextjs by the following cmd: npm install -D eslint-config-next@latest npm install next@latest react@latest react-dom@latest
@lxespadatv2342
@lxespadatv2342 7 ай бұрын
htmlFor is just a label warning.. its not an actual error.. wont crash your application
@Usq7213
@Usq7213 7 ай бұрын
@@lxespadatv2342 it is not but it is always good practice to solve the warning, becuase it can lead to other problem
@ichigokuro3986
@ichigokuro3986 6 ай бұрын
man you are a lifesaver been stuck on this for so long@@Usq7213
@kriskurniawan2561
@kriskurniawan2561 8 ай бұрын
keren bang
@indimerz
@indimerz 3 ай бұрын
I get this error while logging in react-dom.development.js:15147 Uncaught Error: Invalid URL at updateDehydratedSuspenseComponent by this login submitHandler: const onSubmit = async (values: z.infer) => { const signInData = await signIn('credentials', { email: values.email, password: values.password, redirect: false, }); if (signInData?.error) { console.log(signInData.error); } else { router.push('/dashboard'); } };
@seguj
@seguj 7 ай бұрын
its the final code available? my signIn() doesnt seem to execute the autorize function and i have no idea what im doing wrong. great tutorial btw!
@Wansi
@Wansi 7 ай бұрын
hey did you figure it out? getting the same unauthorized error
Learn Prisma In 60 Minutes
59:25
Web Dev Simplified
Рет қаралды 377 М.
Git MERGE vs REBASE
16:12
Academind
Рет қаралды 1 МЛН
Dynamic #gadgets for math genius! #maths
00:29
FLIP FLOP Hacks
Рет қаралды 19 МЛН
когда достали одноклассники!
00:49
БРУНО
Рет қаралды 3,6 МЛН
I Need Your Help..
00:33
Stokes Twins
Рет қаралды 145 МЛН
it takes two to tango 💃🏻🕺🏻
00:18
Zach King
Рет қаралды 31 МЛН
The easiest way to chat with Knowledge Graph using LLMs (python tutorial)
18:35
5 New AI Tools You Should Try
9:18
Skill Leap AI
Рет қаралды 15 М.
KotlinConf'24 - Keynote
56:47
Kotlin by JetBrains
Рет қаралды 41 М.
Next.js App Router Authentication (Sessions, Cookies, JWTs)
11:31
Lee Robinson
Рет қаралды 139 М.
Full-Stack Next.js Blog App with Prisma and Tanstack React Query
1:48:07
Power up all cell phones.
0:17
JL FUNNY SHORTS
Рет қаралды 49 МЛН
ПК с Авито за 3000р
0:58
ЖЕЛЕЗНЫЙ КОРОЛЬ
Рет қаралды 1,6 МЛН
How charged your battery?
0:14
V.A. show / Магика
Рет қаралды 3 МЛН
What percentage of charge is on your phone now? #entertainment
0:14
AMD больше не конкурент для Intel
0:57
ITMania - Сборка ПК
Рет қаралды 519 М.