今天就学习课程吧!
今天就开通帐号,24,700 门业界名师课程任您挑!
Creating private React routes
- [Instructor] All right now that we've got our login and sign up pages completed the next step for our frontend, before we actually start implementing authentication functionality, is for us to add the concept of private routes to our frontend. Basically, what this means is that there are going to be certain pages in our application that we only want authenticated users to be able to see. So in our case, that's just going to be the user info page where we display the user's information. And we don't want unauthenticated users to see this, obviously, because we need to know who the user actually is before we allow them to see and modify their data on the frontend. So as with most things in react, there are several different ways that I've seen to implement private routes. But personally my favorite way is to create a separate private route component. So let's do that. Let's first create a new directory here and…
随堂练习,边学边练
下载课堂讲义。学练结合,紧跟进度,轻松巩固知识。
内容
-
-
-
What is user authentication?6 分钟 27 秒
-
(已锁定)
Basic project setup6 分钟 28 秒
-
(已锁定)
Building a login page8 分钟 54 秒
-
(已锁定)
Building a sign-up page4 分钟 36 秒
-
(已锁定)
Creating private React routes4 分钟 11 秒
-
JSON Web Token basics9 分钟 22 秒
-
(已锁定)
Adding a sign-up route to the server8 分钟 10 秒
-
(已锁定)
Generating JSON Web Tokens6 分钟 10 秒
-
(已锁定)
Adding a login route to the server6 分钟 59 秒
-
(已锁定)
Implementing JWTs on the front end7 分钟 36 秒
-
(已锁定)
Adding JWTs to sign-up page4 分钟 29 秒
-
(已锁定)
Adding JWTs to login page2 分钟 11 秒
-
(已锁定)
Adding an update user route6 分钟 22 秒
-
(已锁定)
Verifying JSON Web Tokens5 分钟 17 秒
-
(已锁定)
Adding JWTs to the user info page7 分钟 29 秒
-
(已锁定)
Adding logout functionality1 分钟 33 秒
-
-
-
-
-
-
-