React Protected Routes | Role-Based Authorization | React Router v6
384.5 هزار بار بازدید -
3 سال پیش
-
Web Dev Roadmap for Beginners
Web Dev Roadmap for Beginners (Free!): https://bit.ly/DaveGrayWebDevRoadmap
React Protected Routes allows you to make part of your React app exclusive to authorized users. Role-Based Authorization allows different levels of access based upon the assigned user roles. This tutorial utilizes React Router v6.
💖 Support me on Patreon ➜ Patreon: davegray
⭐ Become a full-stack web dev with Zero To Mastery Courses:
Advanced React & Redux: https://bit.ly/AdvReactDev
Jr to Senior Web Dev Roadmap: https://bit.ly/WebDevRoadmap-JrtoSr
Master FAANG Coding Interviews: https://bit.ly/FAANGInterview
🚩 Subscribe ➜ https://bit.ly/3nGHmNn
🚀 React JS for Beginners full course - 9 hours: React JS Full Course for Beginners | ...
🔗 Source Code: https://github.com/gitdagray/react_pr...
📬 Course Updates ➜ https://courses.davegray.codes/
React Protected Routes | Role-Based Authorization | React Router v6
(00:00) Intro
(00:53) Welcome and Startup
(01:27) Install React Router v6
(02:17) Update index.js with RRv6
(03:38) Basic Routing Setup
(07:41) useAuth hook
(10:06) RequireAuth component v1
(14:38) Manage browser history
(18:50) Testing with backend authentication
(21:00) RequireAuth component v2
(24:26) Applying Role-Based Routing
(26:35) Object lookup for roles
(28:15) Testing role-based routes
(29:37) Last note on the Unauthorized component
☕ Buy Me A Coffee: https://www.buymeacoffee.com/davegray
🔗 React Router Version 6 in 20 minutes: React Router v6 in 20 Minutes | RRv6 ...
🔗 React User Login and Authentication with Axios: React User Login and Authentication w...
🔗 React Register Form with Validation, Axios and a11y: React JS Form Validation | Axios User...
🔗 Node JS Full Course (with source code) for building the backend REST API that will receive your form submissions: Node.js Full Course for Beginners | C...
🔗 FontAwesome for React:
https://fontawesome.com/v5.15/how-to-...
🔗 RegExr for Regular Expressions: https://regexr.com/
📚 Accessible Form References:
WebAIM.org - Advanced Forms: https://webaim.org/techniques/forms/a...
WebAIM.org - Form Validation: https://webaim.org/techniques/formval...
MDN - Aria Attributes:
aria-invalid: https://developer.mozilla.org/en-US/d...
aria-describedby: https://developer.mozilla.org/en-US/d...
aria-live: https://developer.mozilla.org/en-US/d...
aria-label: https://developer.mozilla.org/en-US/d...
🔗 ES7 React JS Snippets Extension for VS Code:
https://marketplace.visualstudio.com/...
🔗 React Dev Tools Extension for Chrome:
https://chrome.google.com/webstore/de...
📚 References:
ReactJS Official site: https://reactjs.org/
React Wikipedia: https://en.wikipedia.org/wiki/React_(...)
React Jobs: https://www.ziprecruiter.com/candidat...
✅ Follow Me:
Github: https://github.com/gitdagray
Twitter: Twitter: yesdavidgray
LinkedIn: LinkedIn: davidagray
Blog: https://yesdavidgray.com
Reddit: Reddit: DaveOnEleven
Was this tutorial about creating protected routes and role-based user authorization in React with React Router v6 helpful? If so, please share. Let me know your thoughts in the comments.
#react #protected #routes
React Protected Routes allows you to make part of your React app exclusive to authorized users. Role-Based Authorization allows different levels of access based upon the assigned user roles. This tutorial utilizes React Router v6.
💖 Support me on Patreon ➜ Patreon: davegray
⭐ Become a full-stack web dev with Zero To Mastery Courses:
Advanced React & Redux: https://bit.ly/AdvReactDev
Jr to Senior Web Dev Roadmap: https://bit.ly/WebDevRoadmap-JrtoSr
Master FAANG Coding Interviews: https://bit.ly/FAANGInterview
🚩 Subscribe ➜ https://bit.ly/3nGHmNn
🚀 React JS for Beginners full course - 9 hours: React JS Full Course for Beginners | ...
🔗 Source Code: https://github.com/gitdagray/react_pr...
📬 Course Updates ➜ https://courses.davegray.codes/
React Protected Routes | Role-Based Authorization | React Router v6
(00:00) Intro
(00:53) Welcome and Startup
(01:27) Install React Router v6
(02:17) Update index.js with RRv6
(03:38) Basic Routing Setup
(07:41) useAuth hook
(10:06) RequireAuth component v1
(14:38) Manage browser history
(18:50) Testing with backend authentication
(21:00) RequireAuth component v2
(24:26) Applying Role-Based Routing
(26:35) Object lookup for roles
(28:15) Testing role-based routes
(29:37) Last note on the Unauthorized component
☕ Buy Me A Coffee: https://www.buymeacoffee.com/davegray
🔗 React Router Version 6 in 20 minutes: React Router v6 in 20 Minutes | RRv6 ...
🔗 React User Login and Authentication with Axios: React User Login and Authentication w...
🔗 React Register Form with Validation, Axios and a11y: React JS Form Validation | Axios User...
🔗 Node JS Full Course (with source code) for building the backend REST API that will receive your form submissions: Node.js Full Course for Beginners | C...
🔗 FontAwesome for React:
https://fontawesome.com/v5.15/how-to-...
🔗 RegExr for Regular Expressions: https://regexr.com/
📚 Accessible Form References:
WebAIM.org - Advanced Forms: https://webaim.org/techniques/forms/a...
WebAIM.org - Form Validation: https://webaim.org/techniques/formval...
MDN - Aria Attributes:
aria-invalid: https://developer.mozilla.org/en-US/d...
aria-describedby: https://developer.mozilla.org/en-US/d...
aria-live: https://developer.mozilla.org/en-US/d...
aria-label: https://developer.mozilla.org/en-US/d...
🔗 ES7 React JS Snippets Extension for VS Code:
https://marketplace.visualstudio.com/...
🔗 React Dev Tools Extension for Chrome:
https://chrome.google.com/webstore/de...
📚 References:
ReactJS Official site: https://reactjs.org/
React Wikipedia: https://en.wikipedia.org/wiki/React_(...)
React Jobs: https://www.ziprecruiter.com/candidat...
✅ Follow Me:
Github: https://github.com/gitdagray
Twitter: Twitter: yesdavidgray
LinkedIn: LinkedIn: davidagray
Blog: https://yesdavidgray.com
Reddit: Reddit: DaveOnEleven
Was this tutorial about creating protected routes and role-based user authorization in React with React Router v6 helpful? If so, please share. Let me know your thoughts in the comments.
#react #protected #routes
3 سال پیش
در تاریخ 1400/10/24 منتشر شده
است.
384,553
بـار بازدید شده