From the course: React: Creating and Hosting a Full-Stack Site

Unlock this course with a free trial

Join today to access over 25,600 courses taught by industry experts.

Adding Firebase Auth to Node.js

Adding Firebase Auth to Node.js

- [Instructor] Alright, so as I mentioned, there's a few adjustments that we're going to have to make to our front end now that we have access to the user and whether or not they're logged in. But before we do that, we're actually going to take a slight detour and go to the backend because we're going to need to add Firebase off there as well. Now, the reason we need to do this is because even if we put certain protective measures in place on the front end, the endpoints on our server aren't safe unless we actually put logic in the server that will verify that a logged-in user is making that request, right? So in other words, if we didn't add any protection to our server endpoints, a user could just use something like Postman to get around any protective measures we put in place on the front end. So what we're going to do here is we're going to open up our backend, and here we go, we'll just go into the backend directory. And we're going to need to open up our server file here. And in…

Contents