React JWT Authentication - Sign up, Login, Logout & Private Route

Поделиться
HTML-код
  • Опубликовано: 12 ноя 2021
  • React JWT Authentication - Sign up, Login, Logout & Private Route. The backend is in Node.js
    Hostinger Anniversary Deal ➜ bit.ly/3z6Ahvq
    ⭐ Get a Free .COM domain with Premium Plan for 12+ months. Free SSL and Cloudflare included
    🔔 SUBSCRIBE for more:
    bit.ly/Subscribe-Hong-Ly
    💻 Source code:
    github.com/lyhd/jwt-authentic...
    🔗 Related crash courses:
    • JWT Authentication
    🔥 Useful:
    ► Hostinger web hosting for your mission: www.hostg.xyz/SH5yf
    ► Bluehost build and grow your website without breaking a sweat: www.bluehost.com/track/hongly/
    ► Namecheap bring your ideas to life: honglytech.com/namecheap
    ► Squarespace everything you need to grow online: squarespace.syuh.net/bW9KB
    ► Wix create a website you’re proud of: wixstats.com/?a=37210&c=2611&...
    🌐 Website: honglytech.com
    📂 GitHub: github.com/lyhd
    ⭐ My course: honglytech.com/course
    💼 Inquiries:
    E-mail: contact@honglytech.com
    ❤️ Support the channel:
    ko-fi.com/hongly
    🌎 Find me on:
    Facebook: / honglytech
    Instagram: / hongly_tech
    Twitter: / honglytech
    Discord: / discord
    🎬 My gear:
    Keyboard (Logitech MX Keys): amzn.to/3klv4L3
    Mouse (Logitech MX Master 3): amzn.to/3nJeRBr
    Monitor (BenQ EW2480): amzn.to/3vyGJtL
    Camera (Canon PowerShot G7 X Mark II): amzn.to/3ddGNHL
    Microphone (FIFINE K669B): amzn.to/3qotmKa
    #jwt #reactjs #jwtreact
    Disclaimer:
    Some of the links and other products that appear on this video are from companies for which Hong Ly will earn an affiliate commission or referral bonus. Hong Ly is part of an affiliate network and receives compensation for sending traffic to partner sites. The content in this video is accurate as of the posting date. Some of the offers mentioned may no longer be available.
  • НаукаНаука

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

  • @GabrielMartinez-ez9ue
    @GabrielMartinez-ez9ue 2 года назад +1

    Nice! just discovered this channel!

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

    How can I protect a private route? With buirpsuite I can modify the response from the server and I can put a fake token on it and it will let me into the route. In your video I didn't see that you verify the token on the client. How do I fix this?

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

    Hey this really helped me, thanks!

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

      How can I protect a private route? With buirpsuite I can modify the response from the server and I can put a fake token on it and it will let me into the route. In the video I didn't see that you verify the token on the client. How do I fix this?

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

    Thanks for sharing your knowledge 😃🙂👍 just wanna say hi from TEXAS 😜

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

      Hi Jon from Melbourne! You’re welcome 😄

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

    Thanks, you have explained well :) (Y)

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

    Thank you

  • @MG-bm5oj
    @MG-bm5oj 2 года назад +1

    What plugin are u using to have 2 directories separate in the sidebar?

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

      No plugin used for this. You just need to create 2 folders inside one main folder.

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

      You can open both the folders in VSCode also

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

      if you have a ./application with a ./api/ ./client ./proxy ./sensors etc ... just cd into your parent-most directory and type code . if you have code in your path. Command+Shift+P on Mac to open the command pallet and type CODE and then add code to path 😀

  • @user-ql1rg9mj9d
    @user-ql1rg9mj9d 2 года назад

    thanks~!!

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

    Thanks, this is very helped me

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

    what version nodejs uses in the video?

  • @agustinpaglioriti6507
    @agustinpaglioriti6507 5 месяцев назад

    I love you man

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

    I got a CORS origin problem although setting res.header('Access-Control-Allow-Origin', '*') And setting that via cors library , launched ngrok to each one.
    Why got i CORS Error? I don't like use Post man.

  • @joeshajan7085
    @joeshajan7085 2 года назад +3

    why your page is reloading we use react for not reloading the page right?

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

      He did it to show us you're still logged in when you visit the page again.

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

    Please do live coding from the scratch....this isnt helpful

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

      you're right, as long as he just explains the code he already wrote we undertand maybe 60% of what we are doing

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

    .

  • @roy.subhradip
    @roy.subhradip 2 года назад

    pls show your .env file. I am facing issue with -
    const accessToken = await JWT.sign(
    { email },
    process.env.ACCESS_TOKEN_SECRET,
    {
    expiresIn: "1m",
    }
    );

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

      Create a line in the .env file called ACCESS_TOKEN_SECRET=password12345

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

      Add .env file in api folder and in it ACCESS_TOKEN_SECRET="345gdsfg7u6yjANYTHINGOFYOURCHOICE"