Build a Fullstack Login & Register Page with MERN (react.js, mongo, express, bcrypt, jwt & more)

Поділитися
Вставка

КОМЕНТАРІ • 307

  • @moh_idreesmohammadi9118
    @moh_idreesmohammadi9118 Рік тому +11

    I would like to express my gratitude for your invaluable tutorial, which has greatly aided me, particularly in understanding and implementing middlewares. Despite my recent transition to backend development, I have spent an entire month diligently working on this seemingly straightforward project without success.

  • @williambarajas8090
    @williambarajas8090 Рік тому +11

    Explained everything very well in detail, learned so much in under 2 hours. Best video I have watched on MERN, also a great re watch for a refresher on MERN.

  • @rudolphboshoff1545
    @rudolphboshoff1545 6 днів тому

    Thanks for this video, it was overall excellent. I especially loved that you rolled with the mistakes/typos and take us through the process of how you identify the issue and correct it.

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

    wow, this tutorial video is an absolute gem! The clarity of instruction, the depth of knowledge shared, and the engaging presentation truly set it apart. Thank you for making complex concepts so accessible and for empowering learners like me to enhance our skills.

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

    This was amazing, thank you. I haven't seen a video to explain exactly step by step, with checks along the way. Backend makes alot more sense now

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

    this has to be the best video that has broken down all the concept of user interaction with a server

  • @yashsolanki9925
    @yashsolanki9925 4 місяці тому +2

    As a beginner in react, it is was really helpful to me. I appreciate your efforts and make this kind of videos in future best of luck buddy for upcoming projects and happy coding 😊

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

    If you're facing an issue where cookies aren't showing up in the header, try removing the 'return res.json(user)' line from the last part of the 'try' block within the 'loginUser' function.

    • @Your-Majesty
      @Your-Majesty 22 дні тому +1

      Thank you bro

    • @dalarcoin6851
      @dalarcoin6851 15 днів тому

      That isn't in the loginUser, it's in the registerUser function. Taking it out of the registerUser function also had no effect.

    • @mehemmedhezerxanli8228
      @mehemmedhezerxanli8228 15 днів тому

      @@dalarcoin6851 you are talking about another part and problem, if you watch carefully you can see the problem that I mentioned

  • @michaelscofield2469
    @michaelscofield2469 Рік тому +41

    you look like a model than a software engineer

  • @harkiratsingh763
    @harkiratsingh763 4 місяці тому +1

    I am halfway through the video and the video is very easy to follow along
    Thanks a lot for the tutorial

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

    i want to say how grateful i am when i found this tutorial making login, register page with mern. you taught us step by step. i have no other words to say. i am speechless. Thank you so much and SUBSCRIBED :)

  • @tylerdurden4563
    @tylerdurden4563 3 місяці тому +1

    Hi everyone! I think I fixed the need to refresh the page to render the elements based on the user.
    In the Login component page add the following code:
    Import the context file: import { UserContext } from "../context/UserContext"
    Deconstruct the setUser from the context: const { setUser } = useContext(UserContext);
    Then, right below the axios.post to login and above the setData({}), set the user to data.user: setUser(data.user);
    Took me a couple of days of trial/error and it might not be the best fix, but I hope it helps! If anyone has additional comments, please comment it and lets improve together
    Apart from this small issue, great tutorial! Thanks to the creator :D

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

      thats really awesome man, thanks for helping, I had the same issue and this fixed it, its better if you just paste the whole code here though.

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

    Trust me bro u have great potential on this platform , you will definetly reach millions of subscribers

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

      Thank you! Hopefully that happens!

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

      @@brettwestwooddeveloper and yes there is a little thing you can improve is : your screen is so zoom out , things are not seen clearly

  • @ayodejionayinka9215
    @ayodejionayinka9215 4 місяці тому +2

    Your guidance was incredibly helpful, and I really appreciate the time and effort you put into this.

  • @williammaroon4568
    @williammaroon4568 11 місяців тому +4

    Great video. Followed it all the way through and with some rewatches I got it all to work. I think you would get a lot of views with some quicker "follow up" videos. Adding a log-out button, making multiple user role types, and editing data within the dashboard would be logical next steps. There also seems to be a lot of people asking for source code, I think that is because most of the other MERN stack guides are older and don't work anymore. Maybe you could sell the source code, get a buy me a coffee link or something. Great start!!

    • @OnlyJavascript
      @OnlyJavascript 9 місяців тому

      i have production grade code. do u wanna buy me a cafe. it costs 1000USD.

    • @OnlyJavascript
      @OnlyJavascript 9 місяців тому

  • @toobataqi
    @toobataqi Рік тому +1

    Bro, you don't know how you saved my life. stay blessed

  • @rayyazdi7744
    @rayyazdi7744 Рік тому +2

    Hats off to you for teaching these important items so complete. Please do more related MERN stuff in the future.

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

    Brett, You are a blessing mate!, Explaining everything in exact details, Words won't describe how thankful we are for you!!
    Keep it Up!!

  • @sourabhpatole5300
    @sourabhpatole5300 Рік тому +2

    Bro you are good instructor everything you explained in very smoothly

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

    Thank you for the fantastic tutorial! I appreciate the clarity in your explanation and the attention you put into the video. Keep up the great work! I hope your channel continues to grow even more!

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

      Thank you so much Lucas!

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

      @@brettwestwooddeveloper I just have one question, I just finish your tutorial and works fine, but When I change user, I need to refresh to render the Hello `new user`.. How can I make this dynamic, in case I back to login page and when I log in, I dont need to refresh the page to display the "updated" data?

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

      ​@lucassilverio8923 are u adding d status code while logging in??

  • @FaridDiraf-l1b
    @FaridDiraf-l1b 4 дні тому

    8:10 , if you want to import a component automatically, you should just keep this component open in your VS code tabs bar. You managed to import automatically only login and register components because they were open

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

    This is the best video on the topic! Thank you so much! Also, could you please make a video for the logout part as well?

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

    Just Completed This Tutorial and feedback is that Well explained, Any begineer can also understand this complex procuedure. Thank you very much

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

    Saved my life! The only tutorial that i just got a click on my head.. thank u!! I subscribed to your page 😉 u deserved it 100000000

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

    Pulled it off! Now I can use this anywhere!

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

    Thank you for the clarity! This tutorial saved my life! 😋

  • @adc.99
    @adc.99 Рік тому +2

    Thanks a bunch, brother. Such a fantastic tutorial for beginners.

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

    Hats off to you!!! Thank you✌✌

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

    It was great learning and coding together . please provide the css part also !!

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

      Thank you but unfortunately I don't have the source code for this anymore.

  • @johannesabate3089
    @johannesabate3089 Рік тому

    honestly, this is the only tutorial that works. plus tnx for details

  • @aljongabrielambasvaldez
    @aljongabrielambasvaldez 10 місяців тому +1

    Hi Glad that I found your tut, hoping to have more regarding MERN CRUD, thanks

  • @crnomudi7499
    @crnomudi7499 Рік тому +2

    This actually helped me a lot thanks!

  • @dragx26
    @dragx26 Рік тому +1

    You deserve more subscribers ✅💯
    You explained it in very understanding way, point to point 😍🤩
    Subscribed 👍❤

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

    De los mejores videos que he visto para aprender a realizar un MERN completo felicitaciones!!! por mejorar un poco la pantalla grande del lado izquiero para ver y observar mejor las validaciones que realizas con las Developer tools , Continua asi exitos y bendiciones

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

    Good class. Very helpful. Only thing I wish there was a github repo of the class so I could check my work with yours when I do a mistake. Thanks for the lesson though!

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

    Brett, I have to say that everything is amazing to follow and very easy to understand, I am wondering for a bit more info about the port connection from the beginning, and how I can connect it with my actual page, it would be awesome to have some more ideas or videos about it bro. happy to learn from you amazing job!

  • @kumar_sanjeevdutta1069
    @kumar_sanjeevdutta1069 10 місяців тому +1

    Great, I liked your step by step approach

  • @destocot1729
    @destocot1729 11 місяців тому

    only half way through the video but i love the react toast its so clean

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

    Thank you so much for this tutorial!
    It gives such an awesome basis for projects and loads of understanding about Node and Express!

  • @stevenmackey6346
    @stevenmackey6346 4 місяці тому +1

    Great video, still working through it. Any chance you could share the finished code?

  • @Mouldy7890
    @Mouldy7890 Рік тому +1

    Thanks so much for the tutorial, this was really really helpful. Clear and concise explanations! I have subbed and look forward to more videos.

  • @leonardocoelho-xp1tw
    @leonardocoelho-xp1tw 4 місяці тому +1

    Top notch content!

  • @naseehan5959
    @naseehan5959 11 місяців тому +1

    broo its the best video on this topic!!!!!!!!
    Subscribed🤩🤩

  • @atheel5678
    @atheel5678 Рік тому +1

    Thank you for your tutorials ❣

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

    A github repo could be cherry on the top.
    Anyway Great content.

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

      Thank you and yea I wish I had one for this. I am going to recreate this video anyways!

  • @weebandkeeb1834
    @weebandkeeb1834 10 місяців тому +1

    Thanks for the video man! I have learnt a lot from it.

  • @Olhaccord
    @Olhaccord Рік тому +1

    That was very cool, easy to follow the tutorial, super useful information, thank you very much!

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

    awesome tutorial I watched the whole thing. Exactly what I was looking for Thank you

  • @hendyboy
    @hendyboy 11 місяців тому +1

    Sir in this video the login and registration form is created. Sir please make a video on how to show that data in the profile and why to put the image as well.
    Please sir

  • @football-dq5mv
    @football-dq5mv 17 днів тому

    Thank you sir it was great

  • @floramerano6293
    @floramerano6293 4 місяці тому +2

    Again, why do you need to refresh the page to show the greeting message "Hi Brett!"? couldn't you have just shown that greeting the moment the user logs in?

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

      did you find any solution for this? I have been struggling with this problem for days

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

    Wow this was really good video. I really liked it. A little bit explanation how logout works is missing other than that its a real good tutorial. simple and easy for beginners like me.

  • @meghpriyaacharya4728
    @meghpriyaacharya4728 9 місяців тому +1

    Thank you so much this helped a lot.

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

    Ok now I need some help guys. I want to add other things to the Dashboard as well! I want to add a sidebar and nav bar, two divs and all. Problem is, I don't know where to add it. If I add anything else, it stops working

  • @aziznaufalll5600
    @aziznaufalll5600 Рік тому

    This is a very good tutorial, thank you sir. i subbeddd

  • @olamidealiyu4504
    @olamidealiyu4504 Рік тому +1

    Amazing job!!!! It was an amazing build

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

    Such a great tutorial man!!....

  • @aazizim
    @aazizim 10 місяців тому +1

    its helped a lot bro thanks...
    😍

  • @arunavgupta1629
    @arunavgupta1629 Рік тому +2

    hyy , i am getting error of intermediate object undefined while making register page try and catch section

  • @TheDiegoP12
    @TheDiegoP12 4 місяці тому +3

    thanks for the tutorial! After the login how can i avoid having to refresh the page in order to see the data?

    • @brettwestwooddeveloper
      @brettwestwooddeveloper  4 місяці тому +1

      First off thanks for the sub! And yes I will have to make another video demonstrating this because you shouldn't have to refresh the page manually.

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

    Please also create admin login and dashboard which shows all users data who logged in with there name and the email only

  • @tylerdurden4563
    @tylerdurden4563 3 місяці тому +1

    Great tutorial! Thanks for making it!!! I was just wondering if you could continue with this project adding Google Authentification 2.0. Or if you know any other good tutorial or resources where they show you how to add Google Auth to the already existing context and jwt

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

      Hi Tyler and thanks for the support and watching my content. I don't know a good video about Google Authentication with MERN stack. However, I do have a Google Authentication video using Next Auth. Which is with Next.js. ua-cam.com/video/I_YCC_nFt70/v-deo.html

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

    is anyone having a problem with Axios? the git and post request keeps throwing errors for me in register, login and userContext

  • @hendyboy
    @hendyboy 11 місяців тому +1

    Thank you thank you so much brother you are like God gifted for me.🫡🫡🙏🙏 I am bca student from India and I am very helpful for my project, but not anyone can teach for best way but I see your video. I thought, why can't find first you..❤

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

    Awesome but some . were , and some , were dots drove me crazy but it helped me understand the code much better thank you
    check the Auth file if anthing went wrong if you are trying to compare hashedpassword with password

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

      hope you would have added a logout as well,

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

    Really helpful tutorial. One remark, you could've also added a logout part to this tutorial. Really helpful tho

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

    1:33:32 in this place i get an error "jsx attributes must be only assigned a non-empty 'expression'."

  • @Pr0Cre
    @Pr0Cre 11 місяців тому

    Thank you very much, very well explained.

  • @user-tj5kq3lp9c
    @user-tj5kq3lp9c 3 місяці тому

    thanks for the video man!!

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

    Thanks a lot brett for this amazing tutorial, really loved it, although I am getting an error that I am not receiving the data of user on the dashboard, could you please help me somehow?

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

    Please help me am stuck i was even add imgFile so when I click login I receive an error message from imgFile I will send the code here in the comments section

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

    Subscribed ✅

  • @losarihetze
    @losarihetze 9 місяців тому

    thank you for this tutorial!,very helpful!

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

    Tienes un nuevo seguidor! Increíble el video! : )

  • @user-ig8xk9jk3b
    @user-ig8xk9jk3b Рік тому +1

    1:39:15 ill be saving this timestamp for future. i hope i can fully understand this soon. :)

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

    subscribed! amazing vid

  • @AbhishekShukla21
    @AbhishekShukla21 10 місяців тому

    super useful, thank you very much.

  • @cooltv9943
    @cooltv9943 11 місяців тому

    great explanation

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

    Hi! thanks for the video. I have a problem, i cannot see the cooki on the request headers. Can you help me?

  • @gurajb52
    @gurajb52 Рік тому +2

    Great tutorial ! Can this be built upon whereby there is an admin side to see which users have signed up?

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

    Thanks Brother !!

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

    Just one thing, If you are creating an account why you should login again to get a jwt token. if someone is creating an account why not send it at that time

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

    Thanks a lot
    🎉

  • @alphaknite1458
    @alphaknite1458 15 днів тому

    How to make /login not available if the user already logged in.

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

    why we need to reload page to show username in dashboard
    what we can do to directly show username without refreshing it

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

    I mistakenly deleted all the file by using git I'm unable to undo it , can you please provide link if you have saved it in any repo please.
    I'm using it in my project.
    It took me whole day to watch your video and do it piece by piece

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

    also when you login the userContext doesnt change so that needs to be fixed

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

    Кайф, спасибо мужик)

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

    Is there any way to implement the dashboard that it loads user data without refreshing manually? 🙂

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

    Where's the souce code for this???

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

    this a best project for beginners and i love the way Brett Sir teaches us LOVE FROM INDIA

  • @ixMutant
    @ixMutant 3 місяці тому +2

    I have been stuck on it for a day now... 1:28:10 i have the same problem but it doesnt resolve on refreshing

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

      In App.js set "axios.defaults.withCredentials = true"

    • @dalarcoin6851
      @dalarcoin6851 15 днів тому

      Did you ever find the fix for this?

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

    could u share the project code ? this tiny thing will save us hours as it is easy to follow☺☺

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

    why did u need vite ? could u have done the same w npx create-react-app stuff

  • @malekbaouindi4
    @malekbaouindi4 4 місяці тому +1

    Hey there, thanks for the tutorial mate, im having my end of studies project and am following your video to create a video, the single difference is that in the final dashboard file i'll be integrating a power BI dashboard and i was wondering how is that doable ?

    • @brettwestwooddeveloper
      @brettwestwooddeveloper  4 місяці тому +1

      Thanks for the sub! When talking about the dashboard are you talking about the UI or getting the user information to display on the screen?

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

      @@brettwestwooddeveloper thanks for replying, no no, since am studying in the "Data analysis " field, i made a powerBI report, and i successfully integrated it in the mock Dashboard page we made in the tutorial ( thnx again for the vid you're a life saver) now I just need to customize the home page and make it beautiful ( Am still a bit lost on how to do that) and eventually add a logout feature

  • @adoptedpotato4132
    @adoptedpotato4132 Місяць тому +1

    Thank you for the tutorial, very well made. Can I use MySQL instead of mongo? What are the trade-offs and the difficulty level please

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

      Yes, you can use any database you want. But the MERN stack specifically uses MongoDB and if you don't use MongoDB then its not technically a MERN stack anymore. I have never used MySQL but I have heard its not as scalable compared to Postgres SQL or MongoDB. Still a good option for personal or small projects.

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

      @@brettwestwooddeveloper Thank you very much for the response and information, greatly appreciated ☺️. This may be a silly question but what would it be called instead of MERN? Yes I want to start off with my first small project but the recommendation is to use MySQL. I will definitely look into learning and using MongoDB in the future.

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

    Thanks for the video and I don't know if it is a stupid question but which mouse are you using? I just really like the click sound.

  • @sanika5924
    @sanika5924 4 місяці тому +1

    What you did at 1:28:20 so that the request header starts showing cookies

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

      In App.js set "axios.defaults.withCredentials = true"

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

    the token is not setting in the cookie and when signin it doesn't define the payload and response form the server, can anyone have the source code of this so I can see what wrong with my code

    • @RajaniShetty-wg5uy
      @RajaniShetty-wg5uy 6 місяців тому

      Heyy same problem.

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

      do you mean in request header? if so the in App.js set "axios.defaults.withCredentials = true"

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

    Great video, I have some questions, when I type the password in React, if I Login and inspect the login Network Payload, I can see the password before it is hashed, how can I fix that?