Glad it was helpful! A complete video on Social Authentication with Next.js 13 is coming this week. Stay tuned for that. You will also enjoy that video. Happy Coding!!!
- This is Middlewheo for my multilingual, how I have to write to be able to use both Protected Route and Border translation, in a file, there is only one method of export default. Export Default CreatineintlmiddleWare ({ Locales: ['vi', 'en'], defaultlocale: 'vi' }) - Moreover, I want to protect all the paths with the path began with /Dashboard Think is/dashboard/profile or/dashboard/seting/message Also Protected Route
Thanks for the detailed video. Would it be easy to add a password reset? No Next Auth tutorials ever seem to include this feature which is essential for credential-based login.
@@codingwithabbas Nextjs 13's language translation support is not good at the moment, so I used the next-intl package, you can test it with the case of 2 layouts for dashboard and separate user page to see the problem of route protection with middlware
Thanks for creating nextjs videos-- i have a question if user is already login and if user tries to goto login page again , then i want user should redirect to some other page
Hey Bro, thanks for the tutorial. BTW i think it's problem to have callbackUrl as a query params. (35:46) how can i remove that callback url from query ) i've tried to use redirect callback and return empty string but i have callbackUrl= , i don't want to see that callbackUrl at all
@@codingwithabbas i have middleware.js, and if it's not authorized, it's redirecting to /login,,, but adding queryparam callbackUrl, i don't want to have any query param
Wonderful work, currently I'm i 2:04 time, how can we make that if the user is authenticated redirected directly to the page they were denied before authentication using the redirect url, rather than typing the url by ourselves
Just one quick question ⁉️ previously I followed your Udemy course on MERN Stack. Using Next JS 13, we no more need express backend they are simply replaced by next 13 server side components. Right?
When I add the pages option with the ('/page') object in [...nextauth].js, it works fine and I can see the login button, but when I click the login button it doesn't redirect me to the login page of Google, What could be the reason for this error. Thank you in Advance!🫡
Great 👍
Love From Bangladesh 🇧🇩🇧🇩
axios post for new address throwing error as "login first to access this route" while I have already logged in.
Great tutorial on Next-Auth also found out something new about api in next, Thanks.
thank you for show the different steps by steps
This is amazing! Everything I need to know is here, thank you and keep it up!
You're a life saver.
Thank You so much @Coding With Abbas its really simple and understandable
for me.💕💕
Glad it was helpful! A complete video on Social Authentication with Next.js 13 is coming this week. Stay tuned for that. You will also enjoy that video. Happy Coding!!!
thank you very much you saved my life
Glad it helped!
- This is Middlewheo for my multilingual, how I have to write to be able to use both Protected Route and Border translation, in a file, there is only one method of export default.
Export Default CreatineintlmiddleWare ({
Locales: ['vi', 'en'],
defaultlocale: 'vi'
})
- Moreover, I want to protect all the paths with the path began with /Dashboard
Think is/dashboard/profile or/dashboard/seting/message
Also Protected Route
thanks alot, keep going with next js and javascript i love it
Thanks, will do!
Thank you so much for sharing your knowledge, Sir.
What if I want to secure the / page, the root page?
Thanks for the detailed video. Would it be easy to add a password reset? No Next Auth tutorials ever seem to include this feature which is essential for credential-based login.
I am going to start a complete course on Next.js 13, will create a full stack e-commerce app only in Next.js, I'll add this feature in that app.
@@codingwithabbas Nextjs 13's language translation support is not good at the moment, so I used the next-intl package, you can test it with the case of 2 layouts for dashboard and separate user page to see the problem of route protection with middlware
do we need to create a table in mongodb first ? is it naming next13-auth? if no , in which stage of you video have done that ?
We don't have to create any table in mongodb.
Thanks for creating nextjs videos-- i have a question if user is already login and if user tries to goto login page again , then i want user should redirect to some other page
Hey Bro, thanks for the tutorial. BTW
i think it's problem to have callbackUrl as a query params. (35:46)
how can i remove that callback url from query )
i've tried to use redirect callback and return empty string but i have callbackUrl= , i don't want to see that callbackUrl at all
So you don't want callback url in any case?
@@codingwithabbas nope
@@codingwithabbas i have middleware.js, and if it's not authorized, it's redirecting to /login,,, but adding queryparam callbackUrl, i don't want to have any query param
Can you make this guide with route handlers? Without the pages folder?
I'll try.
Thanks for the useful video. May I know why are we not using the built-in fetch function to post the form ?
You can also use that.
Thanks for the video, Abbas! How to solve the glitch `Login/ Hi, Chulam` when the page is reloaded?
Which glitch?
Simple and great 👍
Glad you like it!
error while trying to send data in to register api endpoint
error - unhandledRejection: MongooseServerSelectionError: connect ECONNREFUSED ::1:27017
at _handleConnectionErrors (D:
extauth
ode_modules\mongoose\lib\connection.js:805:11)
at NativeConnection.openUri (D:
extauth
ode_modules\mongoose\lib\connection.js:780:11) {
reason: TopologyDescription {
type: 'Unknown',
servers: Map(1) { 'localhost:27017' => [ServerDescription] },
stale: false,
compatible: true,
heartbeatFrequencyMS: 10000,
localThresholdMS: 15,
setName: null,
maxElectionId: null,
maxSetVersion: null,
commonWireVersion: 0,
logicalSessionTimeoutMinutes: null
},
code: undefined
}
Many thanks for the wonderful presentation!
Glad you enjoyed it!
So Much Amazing
why doesnt the user get routed automatically to the callbackurl after successful login?
Watch this video, I have discussed about that:
ruclips.net/video/MvRmrvMqixs/видео.html
How can I make multi role user base admin dashboard ,like admin , editor , or public , can you please make a video ?
That can be implemented easily, I'll create one after Next.js 13 course.
@@codingwithabbas How many Day I will waiting for that awesome video
33:43 - Protected Routes
Great video! What do we do with the user object after registering. How do you set it up so that you can create a session ? The same way as login?
Are you talking about getting logged in user data?
@@codingwithabbas yeah. Do you have to store as a session manually? Or can you use signIn to register users?
tq
helpful
Wonderful work, currently I'm i 2:04 time, how can we make that if the user is authenticated redirected directly to the page they were denied before authentication using the redirect url, rather than typing the url by ourselves
You can provide callbackUrl in the signIn options.
How to redirect back to protected route after login?
You can pass callback url in the signIn function.
callbackUrl: "/YOUR_ENDPOINT",
Nice video! how can i protect backend routes?
You can watch that part from this video:
ruclips.net/video/xOQiI_sd3tY/видео.html&pp=gAQBiAQB
Thank You sir?
Just one quick question ⁉️ previously I followed your Udemy course on MERN Stack. Using Next JS 13, we no more need express backend they are simply replaced by next 13 server side components. Right?
Yes, In next you don't need express. You can use but not required.
@@codingwithabbas Thank you
Giving me server error with signup
Can you share the error?
When I add the pages option with the ('/page') object in [...nextauth].js, it works fine and I can see the login button, but when I click the login button it doesn't redirect me to the login page of Google, What could be the reason for this error.
Thank you in Advance!🫡
Redirecr to login page of google? Are you talking about social login?