Thanks Umair. I was dealing with `signIn` issue for while. I was debugging since yesterday and not getting output. I was keep getting `NEXT_DIRECT` error but after using that switch case in auth.ts, it's working like charm. Keep posting 🚀
the server side action will give an error in NextJs 15 as they have more strict rules for separation of server side and client side code, and so for nextjs15, the sign in and signout functions should be directly called in the login and logout components.
Appreciate you for this, What is the best practice for frontend if we use micro service for backend, Micro frontend or any other would appreciate if you can teach us microfrontend with react MERN.
How nobody has this issue? PrismaClient is not configured to run in Edge Runtime. So when I get session - session = await auth(); I get that Prisma Client cannot run on Edge. any help?
try to deploy to vercel , but as long as i have the middleware.ts file in root folder i got error: Cross-reference between Middleware and Edge Function. if i delete the middleware.ts, is ok.
I have a question ! if we change the prisma schema or anything else after we are done ! is there a need to rerun the npx prisma generate & npx prisma db push ?
User automatically get created in db while using signin form if it is not already created. So in single step form, we are handling signup and signin. This flow is being followed by many now a days.
00:05 Demo
02:15 Create Next.js project
05:00 Install required packages
06:45 Configure Auth.js v5 in Next.js
12:45 Configure Prisma
19:15 Configure mongodb url
22:40 Generate prisma schema for mongodb
24:00 Configure GitHub login
26:35 App layout and manage sessions
35:30 Login page UI
39:00 login logout server actions
46:13 Testing login with GitHub
49:50 Protecting routes
57:10 Protecting apis
59:55 Build login page form
01:06:50 login with credentials server action
01:11:45 Credentials provider in auth.js v5
01:13:55 hash password
01:15:30 User registration
01:17:20 Update User schema
01:18:55 Final testing
dude the AI copilot is amazing in itself. But also thank you for teaching how to use next-auth w/ prisma
Thanks Umair. I was dealing with `signIn` issue for while. I was debugging since yesterday and not getting output. I was keep getting `NEXT_DIRECT` error but after using that switch case in auth.ts, it's working like charm.
Keep posting 🚀
All video of this playlist is worth to watch...pure quality content
the server side action will give an error in NextJs 15 as they have more strict rules for separation of server side and client side code, and so for nextjs15, the sign in and signout functions should be directly called in the login and logout components.
Appreciate you for this, What is the best practice for frontend if we use micro service for backend, Micro frontend or any other would appreciate if you can teach us microfrontend with react MERN.
How can error be seen and handled in the login page?
How nobody has this issue?
PrismaClient is not configured to run in Edge Runtime. So when I get session - session = await auth(); I get that Prisma Client cannot run on Edge. any help?
I used Vercel's Postgres that uses Neon basically. I had to follow the docs and initiate Prisma Client using @prisma/adapter-neon..
try to deploy to vercel , but as long as i have the middleware.ts file in root folder i got error: Cross-reference between Middleware and Edge Function. if i delete the middleware.ts, is ok.
I have a question ! if we change the prisma schema or anything else after we are done ! is there a need to rerun the
npx prisma generate & npx prisma db push ?
Please make a video on access token and refresh token with auth js
i am also waiting
Hello, I found a mistake in your README... change 'npx prisms db push' to 'npx prisma db push'... there is an 's' instead of an 'a'.
Getting error on
handler : { GET , POST }
How can i solve it
I am getting the same error. The route.ts file in [...nextauth] is not letting me build
its not handler instead its handlers object
till 1 hour the video was good after that you copy paste all the credential's and you say that you modified it idk what happened!
Fantastic video, please make a video for refresh token and access token with auth , thanks a million
Helpfully, thank you sir
please can you make login with facebook I searched on youtube but no one cover how we can login with facebook
Good video .. how about a sign up form ?
User automatically get created in db while using signin form if it is not already created. So in single step form, we are handling signup and signin.
This flow is being followed by many now a days.
Why I get redirected to /api/auth/signin?callbackUrl=%2F whenever I want to sign in
I'm also curious to know that.
me too, i dont know what to do now.
Thanks ! appreaciate if can have next video about reset password .
Awesome - yes, would love password reset via an email address :-)
No sign up in this one ??
My implementation of login auto register (signup) user in db if it is not already registered.
Why use typescript if your code is full of any type?
u save my day thank u
turborepo + prisma +next + mongodb ?????????????
its the same bro
@@antagonist6966 turborepo ?????
Thanks! I think that dependencies mongodb and adapter/mongo are unnecessary because you are using prisma as orm
GOOD WORK
where is the source code??
Repo link is in description.
Thanks brother