Meta Fields and Navigation Guards


Add the following features to your app.

  1. Add a meta field named authRequired to each of your routes defined in router/index.js.  Set the meta field to true only if the route should be accessed by a user who is logged in; otherwise set it to false.
  2. Add a global navigation guard which redirects a users to the home page if the route requires the user to be logged in and the user is not logged in.
  3. Add a route definition that redirects the user to your home page if the users attempts to navigate to a route that is not defined in router/index.js.