Guarding Guest Routes
Explore how to implement guest route guards in Angular using Firebase authentication. Learn to create custom pipes to redirect logged-in users away from guest pages and update your routing configuration to manage access efficiently.
We'll cover the following...
We'll cover the following...
We’re going to add another router guard for routes that are for guests only. We want to redirect the user to the secret page if they are already logged in. The process will be similar to before. We’ll apply a guard to the route with a pipe to change its behavior. Let’s get started.
Creating a pipe
We’ll be using the AngularFireAuthGuard again. Before we do, let’s create the pipe to modify its behavior. The AngularFire package ...