#12: Secure User Authentication with JSON Web Token (JWT) in our MERN App 🔥

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

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

  • @otishsharma
    @otishsharma 4 месяца назад +2


    Understanding the importance of JSON Web Tokens (JWT) for user authentication and authorization
    00:01

    Creation of JSON Web Token is crucial for secure user authentication
    02:03

    JSON Web Token (JWT) is like a card for secure user authentication.
    03:44

    Generating and defining token generation in MERN app backend
    05:26

    Introduction to JSON Web Token (JWT)
    07:42

    Creating payload and signature for JWT in user authentication
    09:40

    Secure user authentication with JSON Web Token in MERN
    11:43

    Generating a token and user ID
    13:5100:01 Understanding the importance of JSON Web Tokens (JWT) for user authentication and authorization
    02:03 Creation of JSON Web Token is crucial for secure user authentication
    03:44 JSON Web Token (JWT) is like a card for secure user authentication.
    05:26 Generating and defining token generation in MERN app backend
    07:42 Introduction to JSON Web Token (JWT)
    09:40 Creating payload and signature for JWT in user authentication
    11:43 Secure user authentication with JSON Web Token in MERN
    13:51 Generating a token and user ID
    Crafted by Merlin AI.

  • @ajjubhai94shorts60
    @ajjubhai94shorts60 Год назад +5

    Sir please ek payment method pe ek video banavo

  • @kishanyadav-t9h
    @kishanyadav-t9h Год назад +4

    hello bro res send time waha tum await nhi use kar skate ho stander code nhi bola jaye ga kitane log tumara ye code dekhe ge yahi kare ge so res mai await nhi use karet

  • @shitalkumari4383
    @shitalkumari4383 5 месяцев назад +1

    sir jwt pr ek seperate vdo bna dijiye with full explaination

  • @NotesandPens-ro9wx
    @NotesandPens-ro9wx 11 месяцев назад +2

    Object ko String mein krne ka faida?

  • @burhansuleymanvural6902
    @burhansuleymanvural6902 15 дней назад

    The token can be stolen and used for malicious purposes. In order to do this, some security operations must be performed on the token. You should also add information about these issues.

  • @indian_gaurav_8648
    @indian_gaurav_8648 11 месяцев назад +5

    are yrr bhiyaa aapne model m jwt kyu banaya...... model ko sirf ek hi cheej k iye use kro baaki kaam controlllers me kro plsss

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

    Thapa Bhai still waiting for ES6 mongo node driver CRUD operations expert video

  • @GamerBoy-be6fr
    @GamerBoy-be6fr Год назад +3

    mera emty token dikha raha hai generat nahi ho raha

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

    Which theme are you using in vs code

  • @kainaatlone
    @kainaatlone 10 месяцев назад

    Dear Sir ap na passport local k through nahi krwaya? best one knsa ha

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

    jsonwebtoken package install nhi ho raha hain

  • @KarishmaSharma-k8n
    @KarishmaSharma-k8n 6 месяцев назад

    nice explanation

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

    Sir JavaScript ka course kab upload korega?

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

    Sir pls full stack web development course on your website
    Pls do reply
    Hmesha like krke chord dete ho sir

  • @BrightCoder1
    @BrightCoder1 7 месяцев назад +2

    Error: secretOrPrivateKey must have a value error aarhi hai sir
    kya kru aage

    • @Cartoonsi
      @Cartoonsi 7 месяцев назад

      solve hua ?

    • @niteshpawar3674
      @niteshpawar3674 3 месяца назад

      Nh ho raha bhai koi solve kr do

    • @BrightCoder1
      @BrightCoder1 3 месяца назад

      @@niteshpawar3674 ho gya solve

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

    Sir pleace make the erd project/rdbms(relational data base managment systel) with the html css javascript php and phpmyadmin mysql playlist

  • @abhishekagrawal3730
    @abhishekagrawal3730 10 месяцев назад

    Cannot read properties of undefined (reading 'sign')

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

    Bhai Google or fb k theough sinup krny ka treqa btadyn

  • @MovieTube_io
    @MovieTube_io 10 месяцев назад

    namikaze minato ❤⚡⚡⚡⚡⚡

  • @BrightCoder1
    @BrightCoder1 7 месяцев назад

    Error: secretOrPrivateKey must have a value

  • @NotesandPens-ro9wx
    @NotesandPens-ro9wx 11 месяцев назад

    generateToken function ko apne ASYNC q bana woto batain bro? at 8:09seconds

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

    yrr series complete ka ho gii
    😗😗

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

    Koi vedio bnandeyn is pr b

  • @aniketbhalla1521
    @aniketbhalla1521 Год назад +8

    Why would someone store the JWT token in the localstorage as it is vulnerable to Cross-Site Scripting (XSS) attacks? And what would be the most secure way of storing the JWT access token in the react app, assuming that we're storing the refresh token in the http only cookie?

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

      Did you get the answer? If not ask ChatGPT the same question.

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

      I do stuck here too

    • @prithwihegde349
      @prithwihegde349 3 месяца назад

      Will store in memory(state) for more secure

    • @shitalunde9528
      @shitalunde9528 3 месяца назад

      You can use subject or behaviour subject to store the token

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

    hi sir there is issue in vps hosting:  ERR_PNPM_RECURSIVE_EXEC_FIRST_FAIL  Command "preview" not found showing this error

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

    I have some issue in node server after adding jwt token
    database connection failed
    [nodemon] clean exit - waiting for changes before restart

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

      you are right ,i also get this error

    • @trend8535
      @trend8535 7 месяцев назад

      Youre database in atlas is not working so reconnect your network one part in atlas

  • @user-rr2hz3ti6l
    @user-rr2hz3ti6l 5 месяцев назад

    So, you're naruto fan😏 by the way great tutorial

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

    i think thapa bro sent this video link to girlfriend

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

    👍👍

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

    TypeError: Cannot read properties of undefined (reading 'sign')
    i am facing this issue pls help me

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

    bhai sar bhum raha hai mera... bapre itna sara chiz ha konsa file ma kia store hoga ma toh pagal ho jaunga.....🤢

  • @aniketverma7801
    @aniketverma7801 4 месяца назад

    smjhiye boojhiye 😂😂😂😂😂😂

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

    Sir, mujhe jwt.sign wala pata nahi chala aur me secret key kyu use karu

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

      we need to add the the sign and secret key isliye taki koi or tumhare imp. files ka access na pasakey and jwt ko secret keys pass krna prdta hai taki ek random strong token we create kar sakey. It's like bank me jatey time token milta hai random right.. n jiski bari wo token lekey jatey hai same hai idr bhi

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

      @@ThapaTechnical thank you I am 13 years old sir

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

    Sir this method is Typically difficult of generate token
    try this
    // matching the password to the hash password
    const domatch = await bcrypt.compare(password, user.password);
    console.log(domatch);
    // generate the token
    if (domatch) {
    const token = Jwt.sign({ userId: user.id }, "" + process.env.JWT_SECRET,
    {
    expiresIn: '7d'
    })
    res.status(201).json({ token, success: "Login Successfully" })
    }
    else {
    res.status(404).json({ error: "Email and Password Not Found" })
    }
    } catch (error) {
    console.log(error);
    res.status(500).send(error, "Internal Server Error")
    }
    })
    ⬇⬇⬇⬇⬇⬇⬇⬇⬇⬇↘↘↘