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

  • @isaacimaobongsamuel8839
    @isaacimaobongsamuel88393 ай бұрын

    finally, I got sendgrid up and running! I have been able to complete your tutorial, and it works for me. Thank you!

  • @blazejmojak
    @blazejmojak3 ай бұрын

    great tutorial as all your tutorials I have watched.

  • @prashlovessamosa
    @prashlovessamosa8 ай бұрын

    Thanks for sharing sir.

  • @rhh1090
    @rhh10903 ай бұрын

    Thank you so much for this amazing tutorial. It has helped me massively! From a happy new subscriber 👍

  • @carlosperez-hz3oh
    @carlosperez-hz3oh6 ай бұрын

    perfect

  • @easywebsolution7044
    @easywebsolution70446 ай бұрын

    Very nice tutorial , it save my time. but I did not use params.

  • @techwithrezvi
    @techwithrezvi7 ай бұрын

    Ur doing nice Brother go ahead ❤️

  • @ProgrammingwithUmair321

    @ProgrammingwithUmair321

    7 ай бұрын

    Thank you so much 😀

  • @ealaniss
    @ealaniss6 ай бұрын

    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!

  • @oluwafemiadetula9117
    @oluwafemiadetula91174 ай бұрын

    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?

  • @creativeartdesign4820
    @creativeartdesign48206 ай бұрын

    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.

  • @simeonvictor3904
    @simeonvictor39047 ай бұрын

    why sendgrid always saying i am not authorized to use sendgrid immediately after creating my account?

  • @user-ss6tw8ot9f
    @user-ss6tw8ot9f7 ай бұрын

    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

    @onix7284

    6 ай бұрын

    YEAH same here.. need sendGrid alternative...🤧

  • @sulaimandev
    @sulaimandev5 ай бұрын

    Can you please update the code in the repo?

  • @isaacimaobongsamuel8839
    @isaacimaobongsamuel88393 ай бұрын

    I can no longer follow along with this video because the sendgrid doesn't work. on creating an account, it throws error.

  • @StephenGorsch
    @StephenGorsch2 ай бұрын

    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,