Creating Login Endpoint & sending auth token| Complete React Course in Hindi #50

Поділитися
Вставка
  • Опубліковано 19 гру 2024

КОМЕНТАРІ • 150

  • @CodeWithHarry
    @CodeWithHarry  3 роки тому +15

    Make sure you access the playlist for smooth navigation - ua-cam.com/play/PLu0W_9lII9agx66oZnT6IyhcMIbUMNMdt.html
    Source Code: github.com/CodeWithHarry/iNotebook-React

    • @shubhamyadav-pf6bv
      @shubhamyadav-pf6bv 2 роки тому +1

      when we encrypted the password while creating user we used salt, but while login we didn't used salt anywhere. why?

  • @ThePrajaktaVlogs
    @ThePrajaktaVlogs 3 роки тому +1

    Harry bhai , mene aaj tak apke utne kuch jyada nhi kiye the follow videos but this playlist i m following from 1 st video itself. Kasam se apki fan ho gyi me 😁❤️ Thank you so much 😇

  • @nextsmssolutions8205
    @nextsmssolutions8205 3 роки тому +15

    Harry bhai apna account no btao, itna helpful videos upload krte ho aap kuch toh deserve krte ho aap, we are investing lots of money for a particular subject in institute, but here we can learn lots of languages with wonderful projects.
    Such an amazing person you are.. ❤️❤️

    • @debjitghosh4869
      @debjitghosh4869 3 роки тому +5

      Use Join Feature on the UA-cam Channel

    • @SukhmanSinghSandhu
      @SukhmanSinghSandhu 2 роки тому +1

      Harry ki site par jao yha par harry bhai ne paytm no diya hua hai

  • @nishkarshdahiya4087
    @nishkarshdahiya4087 3 роки тому +11

    2 million incoming 🔥..Harry bhai OP❤️

  • @ayushyt918
    @ayushyt918 2 роки тому +2

    I used to have a lot of problem while learning backend few months back today I am very much confident Thank you Harry Bhai

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

      i am getting this error


      Error


      Cannot POST /api/auth/login

      after making request on localhost:5000:/api/auth/login please reply if u know the reason behind this error

  • @web_cloud
    @web_cloud 2 роки тому +1

    U are Osm. Literally I have been Learning This JWT auth from few Days . But Finally Today i Understand the Logic . Thank u /// Love From Bihar ❤❤❤❤❤❤❤

  • @smartcoder1185
    @smartcoder1185 3 роки тому +3

    This React Course is Awesome!

  • @pradiprangvani7021
    @pradiprangvani7021 3 роки тому +7

    Hello Harry bhai. I hope you are doing well.
    Jab maine request send ki with password parameter but password ki value blank rakhi to validator work ni kiya sidha user find krne chala gaya bt jaise hi meri body mese maine password key hata di tab exists() vali validator as a error return ki .
    May be aapko exists() ki jagah notEmpty() function use krna chahiye.

  • @hemantwasthere
    @hemantwasthere 3 роки тому +1

    Harry bhaiya rocks xD 🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥

  • @tejaskumar4470
    @tejaskumar4470 3 роки тому +1

    Amazing Bhaiya 🔥

  • @iAmAshuSahoo
    @iAmAshuSahoo 2 роки тому

    maza aagya bhai ... will become a mern stack developer

  • @ritikjjjat38
    @ritikjjjat38 Рік тому +5

    agar kisi ko compare me error aa rahe he ye function do const passwordcompare = async(password) => {
    const match = await bcrypt.compare(password, user.password);
    return match;
    }

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

      Thanks vai 🙌✌️bhot helpful

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

      ap ka ya method laga kar dekha hai auth-token response ma aa rha hai but wrong password laga kar bhi auth-token a rha hai. Any solotion about this?

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

      same problem here
      @@uzairhakeem9478

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

      solved or not@@uzairhakeem9478

  • @pratikharde21
    @pratikharde21 3 роки тому +1

    This react course is awesome 😊😍😍😍😍😍😍🖤🖤🖤

  • @kiratkawal4501
    @kiratkawal4501 3 роки тому +2

    You are genius

  • @gopal12455
    @gopal12455 2 роки тому +1

    this tutorial is very useful

  • @alihasnain7739
    @alihasnain7739 2 роки тому

    Harris sir definitely hit the 4 million before the 2022 ending

  • @anowarulhassan5117
    @anowarulhassan5117 3 роки тому

    Harry bhai is always great... Video is awesome👍😊 🥰🥰

  • @pranjalck
    @pranjalck 2 роки тому

    #harrybhaaijordaar😌💯💯

  • @ShubhamYadav-fb3co
    @ShubhamYadav-fb3co 3 роки тому

    Happy teacher's day Harry bhai❤️❤️

  • @techbro3085
    @techbro3085 2 роки тому +2

    Im planning to shift from Vue js to React JS. This will be more helpful for me. Thanks Haryy Bhai

  • @gouravmewada846
    @gouravmewada846 3 роки тому +1

    Sir *dat*file ko kis extension se use kar sakte hai

  • @RohanDasRD
    @RohanDasRD 3 роки тому +1

    This course is awesome

  • @sayanmukherjee1445
    @sayanmukherjee1445 2 роки тому

    this video is very very helpfull!

  • @seemakhan-jx8lp
    @seemakhan-jx8lp 2 місяці тому

    Assalamo Alikum Sir
    Sir kiya asa office hai jo urdu mai interview ly our office waly urdu bholy muje typescript react javascript and node.js and exprees ati sirf language ka issues hai english ki samj ati par mai bol nhi sakti

  • @rittwickbhabak7348
    @rittwickbhabak7348 3 роки тому

    Best Mern stack course

  • @gouravmewada846
    @gouravmewada846 3 роки тому +1

    Sir can tell me how. Date file ko kis extension se dekhe

  • @tehniatmirza1439
    @tehniatmirza1439 2 роки тому +2

    sir the token generated by createuser endpoint does not match with the token generated with the login endpoint in response after correctly authentication . Is it correct?

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

      same problem. pata chala kya ho raha hai?

  • @vishalmankar4969
    @vishalmankar4969 2 роки тому

    This react course is helpful.

  • @prachideshwal7949
    @prachideshwal7949 2 роки тому +1

    help!! In collections "user login using creds" is not forming .

  • @sharurocky8379
    @sharurocky8379 3 роки тому

    2 videos back to back Harry bhai❤💛

  • @adad8795
    @adad8795 3 роки тому

    Awesome 🔥🔥

  • @prakharsinha4145
    @prakharsinha4145 2 роки тому +2

    everytime, i'm sending login credentials, it is everytime showing up the same thing
    {
    "error": "Please try to login with correct credentials"
    }
    checked codebase multiple times, problem is occuring while comparing the passwords, it is not able to compare passwords....What To Do Guys ?

    • @swasthikkumar5398
      @swasthikkumar5398 2 роки тому

      Did u find any solution??

    • @swasthikkumar5398
      @swasthikkumar5398 2 роки тому

      Solution:the compare method takes a third argument in form of a callback function
      .compare(password,userpassword,(data,err)=>{
      If (err){
      Return res.stastus(401).json({msg: 'invalid credentials '})
      }
      }
      )

    • @prakharsinha4145
      @prakharsinha4145 2 роки тому +1

      @@swasthikkumar5398 yeah i got the solution instead using compare function, you can directly use == operator

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

      Can you the paste the code here

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

      ​@@samirkunwar5845apko eska solution mila

  • @tahamasood2584
    @tahamasood2584 3 роки тому

    this mern stack course is helpfull

  • @khizrshaikh9902
    @khizrshaikh9902 3 роки тому

    4:32
    *_Shaayad harry bhai is near to the airport✈✈_*
    *_Can you listen the background voice it's like plane takeoff🛫🛫🛫_*

  • @nikhilbansal1523
    @nikhilbansal1523 3 роки тому

    bhai react.js se kaha bheja yeh data
    react se node.js m data tranfer dekhna h like we do in angular

  • @s-game-studio45
    @s-game-studio45 3 роки тому

    Thanks a lot Harry bhai

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

    even after entering the correct credentials the authtoken is not working in the login but working perfectly fine in createuser one, help ??

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

      have u got the solution? please reply i am also stuck there

  • @Sd4ss
    @Sd4ss 3 роки тому

    OMG! 2 videos in less than 2 minutes🖥😍😂

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

    thank you harry bhai

  • @toranpatel6790
    @toranpatel6790 3 роки тому

    Harry bhaiya thank you

  • @PrashantPatil.
    @PrashantPatil. 3 роки тому

    harry bhai vs hacker
    hacker : rainbow table
    harry bhai: salts & paper
    hmmm😎😎😎

  • @Beast-AreHumans
    @Beast-AreHumans 5 місяців тому

    love from nepal

  • @codingkaro3266
    @codingkaro3266 2 роки тому +1

    Maja aa raha ha bhout

  • @hemantwasthere
    @hemantwasthere 3 роки тому +1

    Harry bhai k ghar k bahar se plane jata h 😂😂

  • @luvratan1935
    @luvratan1935 2 роки тому +1

    Why no one ever appreciates the outro music!

  • @pmanddmmishra2009
    @pmanddmmishra2009 3 роки тому

    Hii sir can you make can you make a playlist for python beginners 2021

  • @arpitshukla-zt9bp
    @arpitshukla-zt9bp Рік тому

    video 50 completed 😍

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

      i am getting this error

      Error

      Cannot POST /api/auth/login
      after making request on localhost:5000:/api/auth/login please reply if u know the reason behind this error

    • @arpitshukla-zt9bp
      @arpitshukla-zt9bp Рік тому

      @@khushikumari6172 I think you should remove colon after 5000
      Try to do it with localhost:5000/api/auth

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

      @@arpitshukla-zt9bp sorry by mistake i wrote here localhost:5000:/api/auth/login but in request i wrote localhost:5000/api/auth/login only

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

      Do u know the solution of this error?

    • @arpitshukla-zt9bp
      @arpitshukla-zt9bp Рік тому

      @@khushikumari6172 did you remove the colon after 5000?

  • @anowarulhassan5117
    @anowarulhassan5117 3 роки тому

    Harry bhai author token store to kia hi nahi to fir verify kaise kia! Thora technically samjhado please🙏

    • @ASIFAlI-lq4rd
      @ASIFAlI-lq4rd 3 роки тому

      by comparing there, by email's related password with the user given password, which is in req.body

  • @aktech9006
    @aktech9006 3 роки тому

    Plz harry bhai angular pe playlist banado

  • @Anonymous-jx4zp
    @Anonymous-jx4zp 3 роки тому

    ThankYou So Much

  • @abhirajshourya
    @abhirajshourya 2 роки тому

    75MS at 10:28

  • @RahulSingh-on7ko
    @RahulSingh-on7ko 3 роки тому

    Harry Sir please make a video for add cart login authentication

  • @ankit5408
    @ankit5408 2 роки тому

    done harry bhai

  • @Sciencefact-m
    @Sciencefact-m 3 роки тому

    Sir make a video on pandas in python

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

    Thank you

  • @AbhishekJenarucx
    @AbhishekJenarucx 2 роки тому

    Sir yeh issue aa rha jab bhi request send kr rha thunderClient mai.. Connection was refused by the server.
    Database mai bhi create nhn hua kuch MongoDb mai..

    • @shubhamyadav-pf6bv
      @shubhamyadav-pf6bv 2 роки тому +2

      ek bar endpoint check krlo '/auth/createuser' hona chahiye naki 'auth/createuser'
      maybe your connection string is not correct. ping me I will help you

    • @AbhishekJenarucx
      @AbhishekJenarucx 2 роки тому

      @@shubhamyadav-pf6bv kiya bhai maine ek baar firse dekh btata hun

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

      ​@@shubhamyadav-pf6bv i am getting this error


      Error


      Cannot POST /api/auth/login

      after making request on localhost:5000:/api/auth/login please reply if u know the reason behind this error

  • @AYANKHAN-df2qo
    @AYANKHAN-df2qo 3 роки тому

    Btw are we using node js or express

  • @rehman-nry
    @rehman-nry Рік тому

    Harry bhai is always great... Video is osm

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

    at 4:35 i heard a plane voice😂

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

    Plase give example for login with ldap authentication

  • @durgesh2493
    @durgesh2493 3 роки тому

    please make a video for JWT

  • @sajanranjan008
    @sajanranjan008 3 роки тому

    Sir help to solve some problem on php

  • @nikhilgarg4952
    @nikhilgarg4952 3 роки тому

    Amazing

  • @vaibhavchauhan9565493214
    @vaibhavchauhan9565493214 2 роки тому

    Can anybody help me in removing the email index? I deleted it manually but it again got created.

    • @paraschauhan9978
      @paraschauhan9978 2 роки тому

      In /models/User.js their is uinque:true in email due to this email index is created again

  • @bikitirua5935
    @bikitirua5935 3 роки тому +2

    bcrypt compare always return alw false

  • @abhinavshukla5628
    @abhinavshukla5628 2 роки тому

    gajab

  • @tushargogiya4017
    @tushargogiya4017 2 роки тому +1

    Unending sending resquest aa rahi hai login resquest can anyone help me ??

  • @hometvfirestick
    @hometvfirestick 3 роки тому

    thanks

  • @swasthikkumar5398
    @swasthikkumar5398 2 роки тому

    I'm getting the "please authenticate using a valid token" error even if I'm using the VALID TOKEN only
    Can anyone help please

  • @LEGENDX22
    @LEGENDX22 3 роки тому +1

    Op.bruh

  • @ojaselawadhi4425
    @ojaselawadhi4425 3 роки тому

    MySQL full course and git cheatsheet please 🙏🏻🥺

  • @shraek69
    @shraek69 3 роки тому

    good

  • @alphareview4007
    @alphareview4007 2 роки тому

    Cannot access 'user' before initialization ye error aa raha hai

    • @amanpawar2290
      @amanpawar2290 2 роки тому

      let user = await User.findOne({email});

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

      @@amanpawar2290 hi it is not solving now also

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

    50 tak completed with code and git

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

      i am getting this error


      Error


      Cannot POST /api/auth/login

      after making request on localhost:5000:/api/auth/login please reply if u know the reason behind this error

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

      @@khushikumari6172change the method from get to post in thunderclient

  • @snphpowerhouse
    @snphpowerhouse 3 роки тому

    Gjb

  • @ritikakamboj6896
    @ritikakamboj6896 3 роки тому +3

    ab confusion hota ja raha hai

  • @robertbroon9866
    @robertbroon9866 3 роки тому

    First view Harrry bhaii !! 🧡❤

  • @yashverma2986
    @yashverma2986 3 роки тому +3

    jyada kuch smjh nhi aarha ab

    • @ASIFAlI-lq4rd
      @ASIFAlI-lq4rd 3 роки тому +2

      watch video twice ...would become easy then

  • @pmanddmmishra2009
    @pmanddmmishra2009 3 роки тому

    Because there are many new things which we can't understand

  • @_utkarsh_5333
    @_utkarsh_5333 3 роки тому

    Sir😊

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

    6:00

  • @itsmytechnology9285
    @itsmytechnology9285 3 роки тому +1

    🔥

  • @themasterpiece791
    @themasterpiece791 2 роки тому

    Sare code k bad...undefined or server error show kyo kr ra h

  • @quick6175
    @quick6175 2 роки тому

    Full race dedo sb smj aa rha h bhai koe dikkt nhi

  • @VibhorGarg
    @VibhorGarg 3 роки тому +2

    Can i get pinned 🤔🤔🤔🤔

  • @snphpowerhouse
    @snphpowerhouse 3 роки тому

    👌👌👌👌

  • @abhimanyukumarsingh7562
    @abhimanyukumarsingh7562 2 роки тому

    #HarryBhai

  • @snphpowerhouse
    @snphpowerhouse 3 роки тому

    Ohhhh

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

    #harrybhai

  • @cricketanalyst8999
    @cricketanalyst8999 2 роки тому

    #HarryBhai"

  • @maulikvirani5050
    @maulikvirani5050 3 роки тому

    Hello

  • @darshanbid1
    @darshanbid1 3 роки тому

  • @user-me9vo2pf9r
    @user-me9vo2pf9r 3 роки тому

    Half century

  • @fzkrahul3657
    @fzkrahul3657 3 роки тому +2

    First

  • @user-me9vo2pf9r
    @user-me9vo2pf9r 3 роки тому

    1

  • @maulikvirani5050
    @maulikvirani5050 3 роки тому

    I m first?

  • @mdismailhossain5775
    @mdismailhossain5775 3 роки тому

    second

  • @creativekraftbyhand9931
    @creativekraftbyhand9931 3 роки тому

    O pagal jaye

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

    Used the following bcryptjs compare code if the harry bhai vedios code is not working
    bcrypt.compare (password, user.password, (err, data) => {
    if (err) throw err
    if (data) {
    const data = {user: {
    id:user.id
    }}
    const authtoken = jwt.sign(data, JWT_SECRET);
    s.status(200).json({authtoken})
    } else {
    return res.status(400).json({error: "Please enter the correct crediential"})
    })

  • @codewithary
    @codewithary 3 роки тому

    1st view finally