From the course: React: Creating and Hosting a Full-Stack Site
Schalten Sie den kompletten Kurs noch heute frei
Join today to access over 23,400 courses taught by industry experts.
Protecting endpoints using auth-tokens
From the course: React: Creating and Hosting a Full-Stack Site
Protecting endpoints using auth-tokens
- Okay. So now that we've added firebase auth to both our front end and our back end it's time to see how to protect our backend endpoints so that users can't do things like add multiple upvotes or add comments without being logged in. So in both of these cases what we're going to need to do is protect our endpoints by basically checking to see whether the client that made the request was logged in or not. Now, the way that we're going to do that as you'll see is if we make a request from inside let's say our article page, in addition to just making our regular request with Axios, we're are also going to need to include something called an authtoken along with this request. Right now, the authtoken is basically just how the front end proves that the user is logged in and that they are who they say they are. So, you know, if you're not familiar with authtokens don't worry too much about it. Just know that these are what…
Inhalt
-
-
-
-
-
-
-
Why Firebase Auth?1m 17s
-
(Locked)
Creating a Firebase project4m 16s
-
(Locked)
Adding Firebase Auth to React9m 27s
-
(Locked)
Build a login form11m 56s
-
(Locked)
Creating a custom auth hook8m 52s
-
(Locked)
Build a create-account page7m 59s
-
(Locked)
Adding Firebase Auth to Node.js6m 25s
-
(Locked)
Protecting endpoints using auth-tokens8m 44s
-
(Locked)
Protecting the upvote and comment endpoints4m 47s
-
(Locked)
Making requests with auth tokens6m 41s
-
(Locked)
Making interface adjustments for authenticated users6m 34s
-
-
-