Express JS Tutorial - 🔒 JWT Token Authentication - Login & Signup | CheezyCode

Поделиться
HTML-код
  • Опубликовано: 4 дек 2024

Комментарии • 115

  • @rahulawasthi886
    @rahulawasthi886 Год назад +2

    Thank god i landed up to your video for the jwt authentication. So clear explaination about each typed worded. As i heard your explanations about the abstract doubt i has about async and await from half a year. Immediately subscribed your channel.

  • @satyamkumar6469
    @satyamkumar6469 Год назад +2

    Thank you so much! I have been struggling to understand since 3 days. Now I am able to do it

  • @jayarammanikumar229
    @jayarammanikumar229 Год назад +4

    you are like Net Ninja but in Hindi. Perfect explanation!

  • @IndiaCode007
    @IndiaCode007 Год назад +1

    Nice one sir, bht easy way me & bahut clear explain kare aap ne. Thanks

  • @shivajijadhav2864
    @shivajijadhav2864 Год назад

    waoo! best video aaj tak ka ... love u bhai... waiting for next

  • @Jai-xq5hi
    @Jai-xq5hi Год назад +1

    Best video found for authentication. Perfectly explained bhaiya 👌

  • @lingam3717
    @lingam3717 Месяц назад

    Excellent explanation marvellous video of youtube

  • @ReactionCentral1234
    @ReactionCentral1234 Год назад +1

    Hindi me aapne kafi accha samjhaya hai ☺️

  • @phpprojects
    @phpprojects 11 месяцев назад

    Thank you. Video is helpful and your teaching style is good.

  • @muhammadmohsin7279
    @muhammadmohsin7279 Год назад

    only this video cover all the major points. this lecture belongs to strong base of any new project. i came first time here and i am not going without subscribe. you saved my day or more than a day thanks. waiting for your reply these are my emotions for you.

    • @muhammadmohsin7279
      @muhammadmohsin7279 Год назад

      one more thing how can we use this token as authorization of endpoints after login please clear this

    • @CheezyCode
      @CheezyCode  Год назад

      Thank you so much ❤️ Here is the playlist covering Authorization ruclips.net/p/PLRKyZvuMYSIMjYhIwc6vP2eVb9JI6Phsv

  • @nagpurifans7953
    @nagpurifans7953 2 месяца назад

    Very helpful content Thanks you so much ❤

  • @vivekvimal7000
    @vivekvimal7000 11 месяцев назад +1

    Very well explained,
    One doubt what is the use of jwt here?
    I cant see any!

  • @vikram87in
    @vikram87in 2 года назад +4

    This video is a gem💎. Loved it. Waiting for the next one. 😍

  • @vimalradadiya5929
    @vimalradadiya5929 9 месяцев назад

    nice explanation🙏

  • @krishnakumar-kh5vo
    @krishnakumar-kh5vo 2 года назад

    Thanks a lot for this video... waiting for the next ....

  • @raviratnala9536
    @raviratnala9536 Год назад

    straight to point ..

  • @saileshverma1942
    @saileshverma1942 2 года назад

    bestest video ever

  • @uboxtech
    @uboxtech Год назад +1

    everything is explained in a very good way, but try to use dark mode🤧

    • @CheezyCode
      @CheezyCode  Год назад +1

      Thanks but mujhe samjh nahi aa rha aisa kya julm kardiya light mode ne...

    • @uboxtech
      @uboxtech Год назад

      @@CheezyCode eyes ko tease krta h bro🤡🤌

    • @CheezyCode
      @CheezyCode  Год назад +1

      Soni ji ye fomo hai...😁

  • @vishnusureshperumbavoor
    @vishnusureshperumbavoor Год назад +1

    Is it possible to redirect to login page if the user is not logged in using jwt?

  • @CodeDemonBD
    @CodeDemonBD Год назад

    Very helpful video

  • @rishabjain9883
    @rishabjain9883 2 года назад +2

    Such a good video! Easy to understand! Can we get the source code for these!

    • @CheezyCode
      @CheezyCode  2 года назад

      Yes...will push it soon on GitHub

    • @sqb8980
      @sqb8980 Год назад

      @@CheezyCode hi please upload bhai, need it , thanks in advance

  • @sidharth5665
    @sidharth5665 9 месяцев назад

    Do we really need to check the existence of user on signup using findone method. Can't it simply returns error if we defined the userName or email unique in the mongoose schema?? Just want to know what's the best practice.

  • @Vamshi-vd4ti
    @Vamshi-vd4ti 6 месяцев назад

    Clear cutt

  • @moshimoshi_04
    @moshimoshi_04 Год назад +1

    Light theme

  • @muazbhatti41
    @muazbhatti41 2 года назад

    Greatly sum up JWT

  • @aumpatel2936
    @aumpatel2936 Год назад +1

    where is github repo of your this code?

  • @TheUnseenrails
    @TheUnseenrails 2 года назад +2

    Sir, so simply and in a very effective way you taught this topic..I had learnt express from some other youtube channel also, but the concept of JWT wasn't much cleared there and then I Searched for other channels and found this awesome playlist...thanku so much for making it..I request you to please also make a video on the same topic but with data that comes from any login signup form in browser...Hope you will..!

  • @durgeshsingh6380
    @durgeshsingh6380 Год назад

    Excellent 👌

  • @malikabdurrehman3078
    @malikabdurrehman3078 Год назад

    Love this❤

  • @MadarDoraeMon
    @MadarDoraeMon 6 месяцев назад

    hey i want to exclude the password from the response , from all the apis by default if getting the userdetails it must not send password !

  • @prashenjeetroy7551
    @prashenjeetroy7551 2 года назад

    Good explanation ... nice video

  • @malikbhai2285
    @malikbhai2285 2 года назад +1

    sir, mera password match ni kar rha...error de rha hy..ab keya karo...code sab kuch same hi hy..
    ap mujhe es ka code send kar den... p;lzz..

  • @kanhiyabisht6136
    @kanhiyabisht6136 2 года назад +1

    Sir isi tutorial me please socket bhi padha do or uski implementation android me please sir

  • @aafibaloch654
    @aafibaloch654 Год назад

    Plzz make a complete tutorial of nodeJs

  • @ozzyit7512
    @ozzyit7512 2 года назад

    Can i create it with sql server ?

  • @sejalyadav-gk5bk
    @sejalyadav-gk5bk Год назад

    PRO 😍

  • @rishikeshsingh9946
    @rishikeshsingh9946 2 года назад

    Thanku sir

  • @AKASHKUMAR-ri8yo
    @AKASHKUMAR-ri8yo 2 года назад

    great Effort

  • @rohinigaikwad-nk4yz
    @rohinigaikwad-nk4yz Год назад

    I created same code but in postman not getting back and response, dada is not added in my db

  • @quantumgaming7
    @quantumgaming7 2 года назад

    Please use exact status code intead of range
    Like for exiting user it should be 409 not 400

    • @quantumgaming7
      @quantumgaming7 2 года назад

      One more thing please also make refresh tokens scope types etc.

    • @CheezyCode
      @CheezyCode  2 года назад

      Won't be covering refresh token in current set of videos....plan is to quickly setup an api with android app...

  • @krishnakumar-kh5vo
    @krishnakumar-kh5vo 2 года назад

    This apis hosted in our local machine...how will we access these apis through Android project

    • @CheezyCode
      @CheezyCode  2 года назад

      Will host it on Heroku... although you can test it via localhost as well

    • @krishnakumar-kh5vo
      @krishnakumar-kh5vo 2 года назад

      @@CheezyCode ok sir..

  • @karunakarkoyada69
    @karunakarkoyada69 Год назад

    sir can u show models code for note.js

  • @Hrit
    @Hrit 2 года назад

    My code is exactly same as yours, the code gives an error saying "Error: data and salt arguments required". Please Help!

    • @shivanshtandon6871
      @shivanshtandon6871 2 года назад

      Postman mein POST send krne se pehle Body- raw - json ke andar Username pass email likh rhe ho ?

  • @nkbDeals
    @nkbDeals 2 года назад

    Sir kotlin practice series banaye please 🥺

  • @expertfreelancer3890
    @expertfreelancer3890 2 года назад

    sir mujhay problem a rha ha k "jwt.sign is not a function" mry khyal ma ye shyd outdated ho gya ha is liye ye work hee nai kr rha...please age ap mjy is error ka solution bta dn

    • @jatinmourya3190
      @jatinmourya3190 2 года назад

      jsonwebtoken sahi se install hua , sahi se import kiya?

  • @ramdhenge1517
    @ramdhenge1517 Год назад

    Where may I get this source code ?

    • @CheezyCode
      @CheezyCode  Год назад

      github.com/CheezyCode/NotesAPI

  • @undergodss
    @undergodss 2 года назад

    Kaha the sir abhi tak ☹️

  • @krishnakumar-kh5vo
    @krishnakumar-kh5vo 2 года назад

    Sir aaj video aayegi na ??

  • @KamalVerma-wv1bg
    @KamalVerma-wv1bg 2 года назад

    Please upload more videos fast

    • @CheezyCode
      @CheezyCode  2 года назад +1

      Slower is better...chah rahegi toh video dekhoge....course toh 1 din mei upload hojayega but value nahi rahegi...

    • @KamalVerma-wv1bg
      @KamalVerma-wv1bg 2 года назад +1

      @@CheezyCode Agree with you, I started my career watching your videos, keep posting amazing content

  • @ismailasim9119
    @ismailasim9119 2 года назад

    username is undefind error any solution ?

    • @CheezyCode
      @CheezyCode  2 года назад

      First compare your code with this - github.com/CheezyCode/NotesAPI

    • @ismailasim9119
      @ismailasim9119 2 года назад

      @@CheezyCode ok sir ....

    • @ameyapotdar461
      @ameyapotdar461 11 месяцев назад

      @@CheezyCode I cloned the git repostory and it still didnt work

  • @facttechzforyou837
    @facttechzforyou837 Год назад

    Source code available hai ?

  • @indra16
    @indra16 2 года назад

    sir code to de do error ky aa raha wo dhudhna hai

    • @CheezyCode
      @CheezyCode  2 года назад

      Check GitHub - already committed

  • @ankurtripathi5861
    @ankurtripathi5861 2 года назад

    Please share code for this sir as zip aur git repo.

    • @CheezyCode
      @CheezyCode  2 года назад

      github.com/CheezyCode/NotesAPI

  • @code-with-me-2002
    @code-with-me-2002 Год назад

    pro use white background

  • @naveenbasyal001
    @naveenbasyal001 Год назад

    Light mode is 😒😒

  • @malikbhai2285
    @malikbhai2285 2 года назад

    Sir, es ka code kha se mele ga? github link send kare

    • @CheezyCode
      @CheezyCode  2 года назад

      github.com/CheezyCode/NotesAPI

  • @gauravparasar4571
    @gauravparasar4571 Год назад

    bhiya mujhe body smjh nahi ara kyaa hota h yeee

    • @CheezyCode
      @CheezyCode  Год назад

      Post Karte hai toh kuch info server ko bhejoge....wo info ko body kehte hai...why body?
      Http protocol - 2 bande ke baat karne ka tareeka hota hai...client ko server se baat karni hai toh uska tareeka hona chaiye jisse dono samjh paaye ki kya baat ho rahi h...issi ke liye http protocol h
      Ab iss protocol mei kuch parts hai - headers, body
      Header meta info ke liye hote h
      Ya kuch additional info like token
      Body mei actual info bhejte hai ki server pe kya save karana chahte ho

    • @gauravparasar4571
      @gauravparasar4571 Год назад

      @@CheezyCode okkkk bhiyaaa ho ske to ispe video banana.....

  • @lifeoftjj07
    @lifeoftjj07 8 месяцев назад

    bro light themeeee!!!!!!!

  • @jayeshshaha49
    @jayeshshaha49 11 месяцев назад

    Next time pls use dark theme

  • @vikeshyadav8209
    @vikeshyadav8209 2 года назад

    Sir upload video parday

    • @CheezyCode
      @CheezyCode  2 года назад

      koshish hai daily kar paye....kuch din break leke buffer karte hai...

  • @mohsinsayyad6347
    @mohsinsayyad6347 2 года назад

    Sir please use black theme

    • @CheezyCode
      @CheezyCode  2 года назад

      bro cursor issue hojata hai...cursor ki alag feel hai dikhne ki...tutorials ke liye white is preferrable.

  • @flyhigh7250
    @flyhigh7250 Год назад

    jab email and password same hoga tabhi tho token generate hoga wo wali condition tho bhul gye aap

    • @CheezyCode
      @CheezyCode  Год назад

      😐

    • @ramikmukherjee6984
      @ramikmukherjee6984 Год назад

      @@CheezyCode ha yeh wala mereko bhi thora confusion laga what if kisika email aur dusreka password de diya to bhi authenticate ho jayga lag raha hai not sure thora batate to accha hota beginner hu.🙂 koi object wala scene hai kya ki same object ko hi access karega.

  • @anishgupta7348
    @anishgupta7348 2 года назад

    Sir I'm getting this error TypeError: Cannot destructure property 'username' of 'req.body' as it is undefined.
    const { username, email, password } = req.body;
    ^
    TypeError: Cannot destructure property 'username' of 'req.body' as it is undefined.
    pls help

    • @CheezyCode
      @CheezyCode  2 года назад

      index.js mei express.json() call kiya h?

    • @anishgupta7348
      @anishgupta7348 2 года назад

      @@CheezyCode Ha sir kiya tha lekin below routes declaration, place it above and it works.

    • @anishgupta7348
      @anishgupta7348 2 года назад

      Thanks. Can you please start react native as well once this Node series will get finished.

  • @huntit4578
    @huntit4578 2 года назад

    Who the fk uses Light Theme

  • @AbhishekSharma-me
    @AbhishekSharma-me Год назад

    Error: data must be a string or Buffer and salt must either be a salt string or a number of rounds
    at Object.hash (D:\100daysofCode\DEV\jwt
    ode_modules\bcrypt\bcrypt.js:144:17)
    at D:\100daysofCode\DEV\jwt
    ode_modules\bcrypt\promises.js:29:12
    at new Promise ()
    at module.exports.promise (D:\100daysofCode\DEV\jwt
    ode_modules\bcrypt\promises.js:20:12)
    at Object.hash (D:\100daysofCode\DEV\jwt
    ode_modules\bcrypt\bcrypt.js:133:25)
    at signup (D:\100daysofCode\DEV\jwt\src\modles\controllers\userController.js:19:46)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    I'm getting this error. How to resolve this? pls help me

  • @malikbhai2285
    @malikbhai2285 2 года назад

    Error: data and salt arguments required
    at Object.hash (H:\myoldprojects
    odepractice
    ode_modules\bcrypt\bcrypt.js:137:17)
    at H:\myoldprojects
    odepractice
    ode_modules\bcrypt\promises.js:29:12
    at new Promise ()

    • @CheezyCode
      @CheezyCode  2 года назад

      github.com/CheezyCode/NotesAPI

    • @Hrit
      @Hrit 2 года назад

      I am having the same problem. How did you fix it?

  • @expertfreelancer3890
    @expertfreelancer3890 2 года назад

    ERROR IS
    "TypeError: jwt.sign is not a function
    at createtoken (C:\Users\Dell\Desktop\NODE JS AUTHENTICATION AND COOKIES\src\app.js:120:24)
    at Object. (C:\Users\Dell\Desktop\NODE JS AUTHENTICATION AND COOKIES\src\app.js:124:1)
    at Module._compile (node:internal/modules/cjs/loader:1155:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1209:10)
    at Module.load (node:internal/modules/cjs/loader:1033:32)
    at Function.Module._load (node:internal/modules/cjs/loader:868:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:22:47
    [nodemon] app crashed - waiting for file changes before starting..."

    • @CheezyCode
      @CheezyCode  2 года назад

      github.com/CheezyCode/NotesAPI - refer this repo and compare your source code....make sure versions are same in package.json