Mastering Authentication: React, Node, MongoDB | Login, Signup, Forgot Password, Protected Routes

Поділитися
Вставка
  • Опубліковано 2 жов 2024
  • Mastering Authentication: React, Node, MongoDB | Login, Signup, Logout, Forgot Password and Protected Routes. React + Node + MongoDB: Complete "Authentication" and "Protected Routes". First we will implement "React-Router-Dom" for Routing then we will implement Registration page design and MongoDB configuration with User Model and API with bcrypt for password hashing. After signup we will start coding for Login to design it and write API endpoint with jsonwebtoken implementation to generate a token and store it in cookies for sign in. Moreover we will implement "Forgot and Reset Password" with Nodemailer to send email to user for Resetting password. Finally we will write code for Protected Routes and "Logout" functionality.
    Install MongoDB Locally: • Install MongoDB 6.0.6 ...
    Complete MERN Auth: • Complete MERN Stack Au...
    Bcrypt for Hash and Compare Password: • Hash and Compare Passw...
    JWT (JSONWEBTOKEN) Implementation: • JWT Authentication | M...
    Forgot and Reset Password: • Forgot Password and Re...
    MERN Stack Tutorial: • MERN Projects
    Queries:
    Login and Signup in React and Node.
    Login and Registration using React JS.
    MERN Stack Authentication and Protected Routes.

КОМЕНТАРІ • 78

  • @patricioangulo4143
    @patricioangulo4143 6 місяців тому +5

    7:25 npm package
    13:37 react router dom
    25:26 mongoose
    39:44 useNavigate
    48:16 jwt
    1:02:35 nodemailer

  • @gojovoiceover
    @gojovoiceover 6 місяців тому +4

    thank you bro i will never forgot you in your life in UA-cam

  • @chikay2023
    @chikay2023 2 місяці тому +1

    1:13:00
    I only see white page after clicking the link
    error from console:
    No routes matched location "/resetpassword/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY2OGQ0MzVmMmIxMGM3MTBmOTljZGEzZSIsImlhdCI6MTcyMDUzNTM2MCwiZXhwIjoxNzIwNTM1NjYwfQ.tRpPppx9d4GTtN8W37oNPrsUQxhDwQgoAJgDyO9fDM0"

  • @sharryeditz2m956
    @sharryeditz2m956 День тому

    Urdu ma banatay to zyda views anay thay adhay se zyda log ap ki video ki language dekh kr bhaag gay Han

  • @mayursoni2838
    @mayursoni2838 Місяць тому

    it will be very helpful if someone can provide me code

  • @pedromanuelcamargomendez6520
    @pedromanuelcamargomendez6520 8 місяців тому +1

    Hi, will you make forgot password with OTP. Thank you so much.

  • @sarveswarareddyambala6144
    @sarveswarareddyambala6144 6 місяців тому +1

    Hello Sir, Ur Mastering Authentication video is really inspired
    Request failed with status code 404 AxiosError ERR_BAD_REQUEST
    due to this in Post, I am getting 404 (Not Found) then it is not showing data in the database

    • @Rudra-gx3ec
      @Rudra-gx3ec 5 місяців тому

      i an getting the same error ? did your resolve it ?

  • @lovindigital
    @lovindigital 27 днів тому

    link repo github sir?

  • @andreavicari2159
    @andreavicari2159 8 місяців тому +2

    Thanks for this wonderful Video
    As soon as I can I will try in a project
    Many thanks 👏👏

  • @victormurcio8845
    @victormurcio8845 7 місяців тому +1

    You are very good explaining React stuff, i am very gratefull with you. How can i do the deploy of this proyect? Thanks

  • @alihassanhaji2830
    @alihassanhaji2830 8 місяців тому +2

    I really interested this video of authentication thanks you so much for this wonderful tutorial.

  • @VerdadesOlvidadas
    @VerdadesOlvidadas 5 днів тому

    beautiful tutorial...

  • @FaridDiraf-l1b
    @FaridDiraf-l1b Місяць тому +1

    Hi Yousaf, greetings from Azerbaijan, thanks for an exceptional tutorial first. And second, when trying to set up nodemailer, I can't go to App passwords, After entering 2 Step verification, it wants me to provide a phone number to turn it on. But no matter what I type, it always says 'Something went wrong'. Why and how can I fix this?

    • @codewithyousaf
      @codewithyousaf  Місяць тому

      maybe some phone numbers are not acceptable like in Pakistan sometimes it's not working we use Telenor for that.
      just ask we it happen in azerbyjan

    • @FaridDiraf-l1b
      @FaridDiraf-l1b Місяць тому

      @@codewithyousaf I see, I'll try again. Thanks for getting back to me👍

  • @DyNaMiCGaMeRz786
    @DyNaMiCGaMeRz786 6 місяців тому +1

    i want the source code pls

  • @Akash_Raii
    @Akash_Raii 6 місяців тому +1

    Brother Server crashes whenever try to sign up without giving any username email or pw

    • @codewithyousaf
      @codewithyousaf  6 місяців тому

      when server crash check the in terminal the will show you where is the error in server side.

  • @avinashkumargupta8556
    @avinashkumargupta8556 2 місяці тому

    How are you checking the token is correct or not what's the flow ? token generated --> sent to frontend --> then what ????

  • @mayursoni2838
    @mayursoni2838 Місяць тому

    i am facing error in the code even i write exact same code

  • @madathalanithinreddy4594
    @madathalanithinreddy4594 6 місяців тому +6

    When we a getting our first error regarding Cors , after we imported cors but after importing also I’m getting error pls help me

    • @codewithyousaf
      @codewithyousaf  6 місяців тому +1

      after importing cors use it like this
      cors({origin: ["your front-end url"], credential: true})
      front-end
      axios.defaults.withCredentials = true
      watch video carefully you will solve the error I explained.

    • @madathalanithinreddy4594
      @madathalanithinreddy4594 6 місяців тому

      First the authentication is not showing in mongodb

    • @madathalanithinreddy4594
      @madathalanithinreddy4594 6 місяців тому

      37:28 here I’m facing error, and authentication is not showing in mongodb , after I tried to keep login option but the page became totally blank 😢 help me please

  • @suucartoon5427
    @suucartoon5427 Місяць тому

    tnx so much for this worderfull tutorial😊

  • @firefly1887
    @firefly1887 3 місяці тому

    does real world mern project look like this?

  • @requiemx6038
    @requiemx6038 8 місяців тому +1

    very beneficial thx bro

  • @abhijitroy1958
    @abhijitroy1958 5 місяців тому

    give your custom error status too it will be more good, thanks for the video btw

  • @TLTechbender
    @TLTechbender 3 місяці тому

    Thanks Brother, You've helped me a great deal!!!!
    God bless you...

  • @priyankamohanfanboy7
    @priyankamohanfanboy7 6 місяців тому

    thank you so much brother , really it's more helpful, did using git repository , please it will be more helpful to me

  • @madathalanithinreddy4594
    @madathalanithinreddy4594 6 місяців тому

    I saw everything is correct still I’m facing error

  • @alexwaweru19
    @alexwaweru19 3 місяці тому

    This was very helpful, Thank you.

  • @FaheemKhan-l2q6z
    @FaheemKhan-l2q6z 8 місяців тому +1

    Nice vodeo

  • @lavkeshprasad7040
    @lavkeshprasad7040 4 місяці тому

    bro you project is very good, it helps me a lot its a good project

  • @deltonguivala4888
    @deltonguivala4888 4 місяці тому

    You helped me a lottt bro. BIG THANKS.

  • @AbhirajKumar-w8d
    @AbhirajKumar-w8d 6 місяців тому

    Please uplaod source code .

  • @kommushirisha5075
    @kommushirisha5075 8 місяців тому

    Hi, will you make a project for a payment gateway using MERN

  • @xenon1787
    @xenon1787 5 місяців тому +2

    Please give the GIT link of this tutorial
    I need it urgently

  • @madathalanithinreddy4594
    @madathalanithinreddy4594 6 місяців тому

    37:28 here I’m facing error, and authentication is not showing in mongodb , after I tried to keep login option but the page became totally blank 😢 help me please

    • @codewithyousaf
      @codewithyousaf  6 місяців тому

      check with code
      github.com/YousafKhan1/MERN-Stack/tree/main/Signup%2C%20Login%2C%20Reset%20Password%2C%20Email

  • @sabinazeynalova401
    @sabinazeynalova401 5 місяців тому

    thanks for sharing, this helped me a lot)

  • @ruqayahn.k4645
    @ruqayahn.k4645 2 місяці тому

    thank you 🌹

  • @flash0p
    @flash0p 2 місяці тому

    great tutorial

  • @chickendinner120
    @chickendinner120 7 місяців тому

    can you share the source code ?

  • @successfinder8062
    @successfinder8062 7 місяців тому

    I am getting 404 error for " /login" not defined in index.js
    I wrote same code, please help me sir ....

    • @faisalbaig5941
      @faisalbaig5941 7 місяців тому

      spelling mistake hogi dekho dhyan se bhai

  • @zoki5388
    @zoki5388 7 місяців тому

    03:00 doesn't look like its working, because it goes to dashboard even you are not logged in.

  • @vishalprasad8460
    @vishalprasad8460 6 місяців тому

    Source code?

  • @damilareoladele1309
    @damilareoladele1309 7 місяців тому +1

    Login not working

  • @goitommahtsentu7624
    @goitommahtsentu7624 6 місяців тому

    in the forgot password the email is not sending and it says in alert (Error sending email) most probably Google Authentication is blocking me. do you have any idea how to fix it? thanks

    • @17-4-4
      @17-4-4 5 місяців тому

      i'm facing this issue. If you have solved it pls let me know.. i'm struggling with that

    • @nagasai8478
      @nagasai8478 4 місяці тому

      Yes I am also facing email sending issue any one can tell me please

  • @gabrielkingori3375
    @gabrielkingori3375 7 місяців тому

    wow what a great video, keep up

  • @bhupenderkumar9508
    @bhupenderkumar9508 7 місяців тому

    Thanks bro . now i'm able to get a cookie from backend to frontend . But in frontend I was fetching some data from a E-commerce site . it's now giving me cors policy error between API site and my frontend

    • @nishantmoolya
      @nishantmoolya 7 місяців тому +1

      Use cors() in back-end to remove this cors policy error

    • @bhupenderkumar9508
      @bhupenderkumar9508 7 місяців тому +1

      @@nishantmoolya Thankyou buddy . i'm so happy that you helped me . can we connect on any platform like linkedIn and X?

  • @gauravpanta5464
    @gauravpanta5464 7 місяців тому

    Thanks brother, you helped me a lot !

  • @PrinceKumar-pb9xk
    @PrinceKumar-pb9xk 8 місяців тому

    Please provide github repo of this project

    • @codewithyousaf
      @codewithyousaf  7 місяців тому

      github.com/YousafKhan1/MERN-Stack/tree/main/Signup%2C%20Login%2C%20Reset%20Password%2C%20Email

  • @Joel-px2yy
    @Joel-px2yy 7 місяців тому

    Thanks a lot

  • @RatneshKumar-xv3gr
    @RatneshKumar-xv3gr 8 місяців тому

  • @saikumar7247
    @saikumar7247 8 місяців тому

    could u provide github link

    • @codewithyousaf
      @codewithyousaf  7 місяців тому +1

      github.com/YousafKhan1/MERN-Stack/tree/main/Signup%2C%20Login%2C%20Reset%20Password%2C%20Email

  • @chaitanyagbk4251
    @chaitanyagbk4251 8 місяців тому +2

    Great information. Thank you very much for the videos yousaf.
    Do you have a GIT repository?
    If yes can you please share, it actually helps.

  • @abrahamosahon1137
    @abrahamosahon1137 8 місяців тому

    Thank you

  • @sareh8091
    @sareh8091 5 місяців тому +1

    please provide the git source code !!! It will help too

  • @CyberDev_Ayoujil
    @CyberDev_Ayoujil 8 місяців тому

    Nice

  • @rashedulalam-g4r
    @rashedulalam-g4r 8 місяців тому

    sound not so clear bro

  • @Roozikhan565
    @Roozikhan565 8 місяців тому

    ❤❤❤

  • @RatneshKumar-xv3gr
    @RatneshKumar-xv3gr 8 місяців тому

  • @VivekKumar-qx1dv
    @VivekKumar-qx1dv Місяць тому

    please provied code source