Next-Auth Forget | Reset Password in Next.js 14 with MongoDB
Learn how to implementation forget password and reset password functionality using next-auth in next.js 14. I will show you how to generate tokens, store token in user model in mongodb, send email to user with url to reset password, verify token validity and expiry and finally reset password.
So, I will create 2 frontend components for forget password form reset password form. I will create 3 apis to generate and send email to user using sendgrid, api for verifying token which is store in user's model in database and finally reset password api to generate hashed password and update it in database.
First Part (Next-Auth Login Register in next.js 14 with MongoDB):
• Next-Auth Login | Regi...
First part source code (Give it a Star ⭐️ )
github.com/umairjameel321/nex...
01:30 Next.js 14 Tutorials
03:45 Overview of forget password using next-auth in next.js 14
08:50 Update next.js 13 to next.js 14
09:55 Create forget password component for next-auth
15:30 Api route for forget password
21:40 Update User mongoose model
27:30 Configure sendgrid for sending email
37:10 Create reset password component
43:40 Create api to verify token
47:30 Use verify token api on client side
52:00 Create api to reset password
59:30 Testing
#nextjs14 #nextauth #forgetpassword #resetpassword
React tutorials:
• React.js Tutorials
JavaScript Tutorials and Projects:
• JavaScript Tutorial an...
Angular Tutorials:
• Angular 16 Life Cycle ...
Angular 16 Crash Course For Begineers:
• Angular 16 Crash Course
Tech Tutorials - Random:
• Postman Tutorial - Tes...
Complete Next.js 13 Crash Course: • Next.js 13 Tutorials -...
Node Express MongoDB Bootcamp: • Build REST API with No...
ChatGPT Tutorials: • ChatGPT
Join our facebook group:
/ 996305460498149
Contact us for development services:
/ umair-jameel-24aa5368
Пікірлер: 19
finally, I got sendgrid up and running! I have been able to complete your tutorial, and it works for me. Thank you!
great tutorial as all your tutorials I have watched.
Thanks for sharing sir.
Thank you so much for this amazing tutorial. It has helped me massively! From a happy new subscriber 👍
perfect
Very nice tutorial , it save my time. but I did not use params.
Ur doing nice Brother go ahead ❤️
@ProgrammingwithUmair321
7 ай бұрын
Thank you so much 😀
Great video, thanks for sharing! I have a question, how can verify the token using server actions instead api folder? I mean, on my project I have an actions folder where are all the server components, but I'm getting some errors, any advice? Thanks a lot!
i am using Nextjs 14, the SessionProvider isnt working when i imported it to the login client page. how can you help me with it?
Good videos, it should be very good if you showed the flow before staring a education so one can see how all is connected. Sometimes i need to stop to think because you are to fast also. thanks.
why sendgrid always saying i am not authorized to use sendgrid immediately after creating my account?
why i am not able to create an account on the send grid? whenever i try to create one, it says you are not authorize to access it
@onix7284
6 ай бұрын
YEAH same here.. need sendGrid alternative...🤧
Can you please update the code in the repo?
I can no longer follow along with this video because the sendgrid doesn't work. on creating an account, it throws error.
Failed to compile. ./src/app/reset-password/[token]/page.tsx:65:24 Type error: Property 'email' does not exist on type 'never'. 63 | body: JSON.stringify({ 64 | password, > 65 | email: user?.email,