1. 18
    Show Protected Pages only to Authenticated Users with AngularFire Authentication Guard
    3m 3s

Show Protected Pages only to Authenticated Users with AngularFire Authentication Guard

InstructorJorge Vergara

Share this video with your friends

Send Tweet

User authentication has been implemented but you'll notice if you navigate to any route in the app you are free to do so whether you're logged in or not. Let's fix this.

@angular/fire gives us a feature that is prepared to handle protected routes: the authentication guard.

We'll add that guard to our routing module to protect our tasks page, and redirect unauthenticated users to the login page.