From the course: Firebase Essential Training
Unlock the full course today
Join today to access over 24,700 courses taught by industry experts.
Add private routes - Google Cloud Tutorial
From the course: Firebase Essential Training
Add private routes
- [Instructor] Okay, so we've got all the functions we need in place to actually add authentication to our app. The next step we're going to take here is changing our app just a little bit so that only authenticated users can visit certain pages. If we open up our app.js file, which contains all of the routes for our application, we see that we have all of these routes defined so that the correct page renders when we go to a given URL in our browser. And don't worry if you're not really familiar with react-router-dom, which is the package we're using here, it's just the main way of doing routing related logic in React applications. Now, what we want here is for some of these routes, pretty much all of them besides the sign-in, create account, and email confirmation routes, we want these to be accessible only to authenticated users. And this isn't so much out of security as out of the fact that it just wouldn't really…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
What is Firebase Auth?2m 41s
-
(Locked)
Set up the sign-in methods2m 58s
-
(Locked)
Important Firebase Auth functions4m 32s
-
(Locked)
Avoid vendor lock-in3m 24s
-
(Locked)
Create a sign-in wrapper function4m 57s
-
(Locked)
Create other auth wrapper functions4m 40s
-
(Locked)
Add private routes8m 49s
-
(Locked)
Sign in and sign out4m 48s
-
(Locked)
Authentication pricing1m 9s
-
-
-
-
-
-
-
-