excellent video man. covered every small detail in the auth process. been searching for a proper next auth tutorial for the last 24h (spent the whole night from 12am to 6am fixing a weird bug with server actions returning errors in form).
Don't worry it's a great straight to the point video , If you struggle understanding, don't watch this it's definitely not for someone who doesn't understand how to quickly navigate the code editor and move your functions to create separation of Concern or reading docs, Learn and read the docs first, then this tutorial is a piece of cake
While making final component to render We write the code like export default function App(){ return () } OR export function App(){ return () } OR function App(){ return () } export default App; OR const App = ()=> { return () } export default App; What is the difference in these 4 types of "export" in React-JS??
bro listen export default app ()=>{} and function app ()=>{} export default app are same but when u import this in different file u will import same file with any name and u can import only one but when u dont write default in ahead of app u have to import with same name like import { function name } from "../app" like this and u can do multiple import but in export default u cant do multiple import but while importing u can use any name i hope u understand
After watching your video, I implemented the solution in my project. While it works flawlessly in development mode, I encountered a problem in production build mode, receiving an 'not allowed in Edge Runtime' error originating from Mongoose. Despite numerous attempts, I haven't found a solution yet.
My middleware file is not working If you have checked the session on each route then why middleware is needed When I remove it, the app will be run. And Authjs V5 no longer supported middleware
Can you explain how to use Redux Toolkit or React Redux in Next.js? After implementing it, our entire application can be either client-side or server-side. I'm unclear on how to properly use it in Next.js, so could you clarify my doubts? Also, please explain the advantages and disadvantages of using Redux in Next.js. I've noticed that there are tutorials on TH-cam not covering the use of Redux in Next.js. Is Redux unnecessary in Next.js, or is there a reason it's not widely used? If a larger application requires Redux in Next.js, how is it implemented? I'd appreciate it if you could address these concerns in your next video. I've commented multiple times on other channels, but I haven't received any responses. If you can create a video on this topic, it would be immensely helpful, as I've been struggling with these questions, and it seems others may have similar doubts. Thank you!
Hey, Can you make a separate video on how we can handle auth with a separate backend. Suppose we are using access token & refresh token based auth in express backend then how can we access the token both in server pages & client pages to call our backend apis & silently refresh the token?
If you want to generate a token in Express, call your Express route inside the authorize handler from the Next.js server, generate the token in Express, set the response cookies from Express, and then set the response cookies from the Next.js server. Now, on subsequent requests to the Express server, the cookies will be automatically attached to the request.
Everything is fine and also one of best video on next auth but i am having some questions 1. Why don't you provide token while registering user because in modern world user is logged in after registration 2. Suppose i am having more fields in user schema like education, phone number which is required field so in Social providers how we can achieve that? Thanks for your efforts.
1- If you want to make user logged in after sign up, you can create a token and set in cookies manually, but I didn't do it because I think better approach would be to send verification email to user, then after verification only, user can login. 2- In the case of social login, user will login without education or phone field but after login, in the profile page user will have the ability to fill those details.
Sir please aik video Next 14 app router main authentication pr bna dain cookies or localstorage use kr k with protected routes. and please use separate APIs donot use next js api. main bht search kia ni mill raha
There is a problem with the server configuration. Check the server logs for more information. when I enter the incorrect password, then why page is redirected. i want to show error on the login page
Do someone faced problem in accessing ( throw new CredentialsSignin({cause: "Password does not match"}) )? Bcz cause is not available. How to show this cause? Please help me.
use Error dont use CredentialsSignin and in catch in login.ts use this if (error instanceof AuthError) { if (error.cause?.err instanceof Error) { return error.cause.err.message; // return "custom error" } switch (error.type) { case 'CredentialsSignin': return 'Invalid credentials'; default: return 'Something went wrong'; } } throw error;
Bhaiya ecommerce using nextjs pe project banaiye please 🙏 🙏 bhaiya Maine aapka chat application video dekha aur banaya mere internship ki salary se mai aapke project ka fees dunga ❤❤ bhaiya thanks ❤ please 🙏 bhaiya ecommerce using nextjs project laiye 🙏
I have never seen this much bad teaching method. you are pausing the video and then Oh! I coded this and the video recording was paused shit man. I just request you delete this video ASAP.
Join Discord: discord.gg/mhRB3wuS33
bro provide github link too broo
Hi!!! Please make tutorial on ai photo enhancer web app development like Picwish and cutout pro.. Will you create????
please also give github link
excellent video man. covered every small detail in the auth process. been searching for a proper next auth tutorial for the last 24h (spent the whole night from 12am to 6am fixing a weird bug with server actions returning errors in form).
I was searching for such video and I found this
and suddenly I saw that this video is uploaded 4 minutes ago
What a co-Incidence
Don't worry it's a great straight to the point video , If you struggle understanding, don't watch this it's definitely not for someone who doesn't understand how to quickly navigate the code editor and move your functions to create separation of Concern or reading docs, Learn and read the docs first, then this tutorial is a piece of cake
Bhai aap kitna bdia smjhato yaar, koi faltu overacting nahi ek dum raw and real ❤
I was struggling for a week and found this video today. Life saver bhai. Definitely a gem
G fad video bro after wasting almost 10 hrs finally understood because of you ❤
You are a goddamn saviour. This is exactly what I was searching. Thank you sooooo much man.
Great, please make more videos on Next 14 to make reuseability.
Nextjs+express+mongodb+jwt pura auth jst complete kr liya, 😂😂
Wow
Express Kaha se hota hai Next JS MEI 😭😭😭???
Next.js ke saath express kon use karta he
Express js🤔
While making final component to render
We write the code like
export default function App(){
return ()
}
OR
export function App(){
return ()
}
OR
function App(){
return ()
}
export default App;
OR
const App = ()=>
{
return ()
}
export default App;
What is the difference in these 4 types of "export" in React-JS??
bro listen export default app ()=>{} and function app ()=>{} export default app are same but when u import this in different file u will import same file with any name and u can import only one but when u dont write default in ahead of app u have to import with same name like import { function name } from "../app" like this and u can do multiple import but in export default u cant do multiple import but while importing u can use any name i hope u understand
@@growuptips Yes, I understood
After watching your video, I implemented the solution in my project. While it works flawlessly in development mode, I encountered a problem in production build mode, receiving an 'not allowed in Edge Runtime' error originating from Mongoose. Despite numerous attempts, I haven't found a solution yet.
Did you solved it bro?
keep uploading the videos bro soon you will reach 100k
My middleware file is not working
If you have checked the session on each route then why middleware is needed
When I remove it, the app will be run.
And Authjs V5 no longer supported middleware
sir g un necessary chezian remove krnay kay liay kon sa tool kia hy ?
Can you explain how to use Redux Toolkit or React Redux in Next.js? After implementing it, our entire application can be either client-side or server-side. I'm unclear on how to properly use it in Next.js, so could you clarify my doubts? Also, please explain the advantages and disadvantages of using Redux in Next.js.
I've noticed that there are tutorials on TH-cam not covering the use of Redux in Next.js. Is Redux unnecessary in Next.js, or is there a reason it's not widely used? If a larger application requires Redux in Next.js, how is it implemented?
I'd appreciate it if you could address these concerns in your next video. I've commented multiple times on other channels, but I haven't received any responses. If you can create a video on this topic, it would be immensely helpful, as I've been struggling with these questions, and it seems others may have similar doubts. Thank you!
Zustand is way more easier and does the same..
@@shashinegative9366 +1.
Please make a video on access and refresh token for this project
Do you have any nextjs14 course on udemy or any other platform?
Hey, Can you make a separate video on how we can handle auth with a separate backend. Suppose we are using access token & refresh token based auth in express backend then how can we access the token both in server pages & client pages to call our backend apis & silently refresh the token?
If you want to generate a token in Express, call your Express route inside the authorize handler from the Next.js server, generate the token in Express, set the response cookies from Express, and then set the response cookies from the Next.js server. Now, on subsequent requests to the Express server, the cookies will be automatically attached to the request.
Amazing video!! Exactly what i was looking for.
Everything is fine and also one of best video on next auth but i am having some questions
1. Why don't you provide token while registering user because in modern world user is logged in after registration
2. Suppose i am having more fields in user schema like education, phone number which is required field so in Social providers how we can achieve that?
Thanks for your efforts.
1- If you want to make user logged in after sign up, you can create a token and set in cookies manually, but I didn't do it because I think better approach would be to send verification email to user, then after verification only, user can login.
2- In the case of social login, user will login without education or phone field but after login, in the profile page user will have the ability to fill those details.
Bro need more videos on next js@@6PackProgrammer
bro boht acha samjhaya 👏
Will it be good to create a new api for the user post or the above action server code is better
great explanation!!!
Next js series please
production level coding 👍
Please make next 14 series
Best tutorial video on TH-cam
We miss your content bro
Sir please aik video Next 14 app router main authentication pr bna dain cookies or localstorage use kr k with protected routes. and please use separate APIs donot use next js api. main bht search kia ni mill raha
Next js or MERN stack which should i learn?
First go to MERN then You can go with learn NEXTJS
Could u have please shown the demo first before directly diving into code editor😁🥰
bro never disappoint from his content
sir can you make a project tutorial with nodejs nextjs kafka graphql. Learnt a lot from you.
as always great video 🔥🔥🔥🔥
There is a problem with the server configuration.
Check the server logs for more information. when I enter the incorrect password, then why page is redirected. i want to show error on the login page
try use this in login.ts
"use server"
import { signIn } from "@/auth";
import { AuthError } from "next-auth";
const credentialsLogin = async (email: string, password:string) => {
try {
await signIn("credentials", {
redirect: false,
callbackUrl: '/',
email,
password,
});
} catch (error) {
if (error instanceof AuthError) {
if (error.cause?.err instanceof Error) {
return error.cause.err.message; // return "custom error"
}
switch (error.type) {
case 'CredentialsSignin':
return 'Invalid credentials';
default:
return 'Something went wrong';
}
}
throw error;
// const someError = error as CredentialsSignin;
// return someError.cause;
}
};
export {credentialsLogin}
Do someone faced problem in accessing ( throw new CredentialsSignin({cause: "Password does not match"}) )? Bcz cause is not available. How to show this cause? Please help me.
did you fix that??
use Error dont use CredentialsSignin
and in catch in login.ts
use this
if (error instanceof AuthError) {
if (error.cause?.err instanceof Error) {
return error.cause.err.message; // return "custom error"
}
switch (error.type) {
case 'CredentialsSignin':
return 'Invalid credentials';
default:
return 'Something went wrong';
}
}
throw error;
next level content sir thanku
Badia video bhai thanks.
how to use the mongo db server while deploying ?
Please make more videos on Next Js
Yes we want manual authentication
bhai vs code mai automatically code kaise suggest horaha??
No signout????
what extension are you using for autofilling the code
his using a github copilet but its not free.
but "codium" and "tabnine" extension are free for auto code completion.
behtreen information
please make videos on nest js, Prisma, micro services, docker please
bro please upload full ecommerce project with reduc toolkit please bro your content are so amazing
make full authentication with custom login and social login in react... i dont think whole youtube have this...kindly do this
where we can get the source code?
Love you bhai 🤟
Nice, Thank you.
bhai refresh token bhi btao
Yaar logic building 😢 me abhi bhi problem aa rhi hai mujhe
how to next js 14 custom server example windows iis
Outstanding 🎉🎉❤❤
Bro sass use karo please next project mai
My authorize function is not working, anybody faced this problem?
Use the beta version
Job wagra v kar rahe ho bhai kahi ???
Sir Koi badi Acchi project lao nextjs pe, eCommerce type project or Instagram clone
wanted the manual auth in nextjs please
bhiya nextjs me nodemailer se contact us form bnvaa doo
Nodejs course when?
Ye kuch na daalta
@@dipanshusabharwalbhai itni videos toh hai channel me or kya chaiye tujhe
@@dipanshusabharwal Acha L ,, pehle saare videos checkout kar 2 baar Nodejs cover kar chuka hain
Already available
Ek mega project next typescript prisma sql shadcn redux ya zustand
1:06:48 pe samne kon tha😂
Source code?
Next-auth is sorted now
Hello bhaii, can i know your vs code theme
please give source code
big love from pakistan , thanks
jo like no kare uski ma ko parnam ... nahi ho gi
Make video on multi-factor authentication
redirect give an error
Make production level project using nextjs 14
Bhaiya ecommerce using nextjs pe project banaiye please 🙏 🙏 bhaiya Maine aapka chat application video dekha aur banaya mere internship ki salary se mai aapke project ka fees dunga ❤❤ bhaiya thanks ❤ please 🙏 bhaiya ecommerce using nextjs project laiye 🙏
Bhaiya nestjs with nestjs laoo course
Hello 6 pack programmer can you help me next js project in seo regading
Please make a timestamp
Github code wud help
Bhai please provide the github link.
bring a big project using nextjs typescript
it's not working on production mode. it's showing error
The error was caused by importing 'mongoose/dist/browser.umd.js'
please share the solution
41:00
Iss video ke timestamps provide kar do koi
Use clerk😂
don't know but this is not best video not even quality video
mad content
Nice
maja aya
good
NIce 👍
❤❤❤❤
I wasted 41 minutes. Worst video on next auth.
dude English man
bakwas video he , poor explanation , apko to ata he , jo dyk raha he uske mutabiq teach karo
I have never seen this much bad teaching method. you are pausing the video and then Oh! I coded this and the video recording was paused shit man. I just request you delete this video ASAP.
❤❤❤❤❤
❤