JWT Authentication Masterclass: Access & Refresh Tokens | Secure Your MERN Stack App

Поділитися
Вставка
  • Опубліковано 2 жов 2024
  • Learn JWT Authentication from scratch! This video explains JSON Web Tokens (JWTs) and how to use them for secure user authentication and authorization in your MERN stack (MongoDB, Express, React, Node.js) applications. Master Access and Refresh token functionalities to enhance user experience and security.
    Source Code:
    Support Me:
    www.buymeacoff...
    #JWTAthentication #MERNstack #Accesstoken #Refreshtoken #Userauthentication #Authorization #SecureMERNstack #JWTTutorial #MERNsecurity

КОМЕНТАРІ • 47

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

    My honest opnion, I have seen a lot of videos regarding JWT , yours is the most clear and helpful video. Even when you find error in your code and you didn't cut that part so that we can learn how to debug errors. Subscribed brother!

  • @MounaBaiBRGHCS
    @MounaBaiBRGHCS День тому +1

    Thank you yousaf :) thanks a lot i was stuck with from past 2 days now i am clear about this and i got

  • @dobingify3130
    @dobingify3130 9 місяців тому +5

    This is straight forward class. I understand jwt easily because of this video. Thank you!!

  • @SanduSenavirathne
    @SanduSenavirathne 9 місяців тому +5

    Big thanks for you brother. You the only one guy I found that teach the these kind of concepts one by one clearly 😉

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

    For what shall it profit a man, if he shall gain the whole world, and lose his own soul? Or what shall a man give in exchange for his soul?
    Whosoever believeth in Jesus Christ should not perish, but have everlasting life.
    Please come to Jesus Christ, He loves you.

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

    Bro you have good knowledge but your method is very confusing because you don't stop one task to finish. You must finish first the backend part to confirm the backend logics are working fine. Then proceed to the frontend. Otherwise your visitor will keep navigating from one task to another, and, in the end he will get frustrated and give up.

  • @edled5939
    @edled5939 9 місяців тому +3

    Can you please post the source code? Its not in the description

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

      click on the link buymeacoofe.com you will get there

  • @AshishRaj04
    @AshishRaj04 8 місяців тому +3

    What a masterpiece of a tutorial . Keep uploading such type of videos . The error hunting at the end was pure gem . Thanks a lot .

    • @AshishRaj04
      @AshishRaj04 8 місяців тому +3

      but where is the code ?

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

    I am using the fetch method i am unable to store cookie please help me

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

      fetch(
      'url',
      { credentials: 'include' }
      )

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

    Thank you so much for this tutorial brother 😀

  • @Coder856
    @Coder856 9 місяців тому +2

    Wow superb brooo

  • @nocheatmsmurf6702
    @nocheatmsmurf6702 9 місяців тому +2

    welcome Yousaf

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

    please help me i made crud system node js react and mongodb and i dont how that crud added them login form pls help me and its asseynment from my university pls help me

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

      you want to add login to the crud app you have created?

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

    Thanks!

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

    Waaaaaaaaaaa,,,,You are true youtuber with crystal clear explanation 👌 bhai ❤️ u lot .....N god bless u bro.....for teaching us!!!🎉

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

    Thank u so much brotha ❤

  • @سعید-ظ2ف4ي
    @سعید-ظ2ف4ي Місяць тому

    What is different between access token and refresh token?

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

      An access token is a short-lived token used to authenticate and authorize requests to protected resources. A refresh token, on the other hand, is a long-lived token used to obtain a new access token once the current access token expires, without requiring the user to re-authenticate.

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

    excellent job bro...

  • @sharan.r
    @sharan.r 4 місяці тому +1

    Great video, I want a logout functionality, how can I implement this?

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

      create a button by pressing btn If token is stored in cookies remove it from cookie ..

    • @sharan.r
      @sharan.r 4 місяці тому

      @@codewithyousaf I tried this in my logout route but it doesnt seem to remove the cookies for some reason:
      res.cookie('refreshToken', '', { maxAge: 0, httpOnly: true, secure: true });
      res.clearCookie('accessToken');

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

    Next Tutorial sir is for Protected Routes for MERN stack

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

      I have video on that you can searcch in my channel.
      also you can find employee management system on my channel where I implemented.
      tomorrow I will upload a project you can watch that.

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

    Sir where are you from??

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

    Than you sooo much :))
    Please provide source code link for the same :))

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

    47:46

  • @SubhanAli-ej1hj
    @SubhanAli-ej1hj Місяць тому

    thanks

  • @aswinkrishna-r7s
    @aswinkrishna-r7s Місяць тому

    Great

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

    I like your videos Yousaf, Thanks!👍👍👍👍👍🤝🤝🤝🤝🤜🤛

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

    A million thanks for this video, so helpful!!!

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

    l am waiting social media app from you please 😀❤️

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

    Is there a source code for this?

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

    you are doing very WELL sir,

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

    The refresh token is not working

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

    how to integrate with website

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

    I can use fetch? Axios is bad

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

    Thanks so much 😊😊

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

    38:54

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

    41:32

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

    Yousaf bhaiii agr Apne aik chuta sa video banao na ompass py wo locally kaisy set kar skty haiii

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

      mi ny already banaya hi search in my youtube channel Compass

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

      ua-cam.com/video/bLcdMzC2jbU/v-deo.htmlsi=dTvkW9fra7lfxx6G