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. - Наука
Nice! just discovered this channel!
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?
Hey this really helped me, thanks!
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?
Thanks for sharing your knowledge 😃🙂👍 just wanna say hi from TEXAS 😜
Hi Jon from Melbourne! You’re welcome 😄
Thanks, you have explained well :) (Y)
Thank you
What plugin are u using to have 2 directories separate in the sidebar?
No plugin used for this. You just need to create 2 folders inside one main folder.
You can open both the folders in VSCode also
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 😀
thanks~!!
Thanks, this is very helped me
what version nodejs uses in the video?
ig v5
I love you man
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.
add app.use(cors()) in api->index.js
why your page is reloading we use react for not reloading the page right?
He did it to show us you're still logged in when you visit the page again.
Please do live coding from the scratch....this isnt helpful
you're right, as long as he just explains the code he already wrote we undertand maybe 60% of what we are doing
.
pls show your .env file. I am facing issue with -
const accessToken = await JWT.sign(
{ email },
process.env.ACCESS_TOKEN_SECRET,
{
expiresIn: "1m",
}
);
Create a line in the .env file called ACCESS_TOKEN_SECRET=password12345
Add .env file in api folder and in it ACCESS_TOKEN_SECRET="345gdsfg7u6yjANYTHINGOFYOURCHOICE"