Convenience route that bundles some of the auth route mixins. It essentially handles redirects and everything to ensure that only users who are authenticated can access the route. It also handles redirecting to index route if the user has no roles within the app.
Usage: (in a routes file)
import AuthRoute from './auth';
export default AuthRoute.extend({
// your code here...
});
Basically all of the routes in your app should extend AuthRoute
(or RestrictedRoute
if only certain roles have access to that page) unless you want the route to be accessible
even if the user is not logged in.
Methods
Properties
rejectedRoute
String publicRoute to transition to if the check (for authentication and having roles) fails. This should ordinarily be left to the default, but could be overwritten if the need arose.
Default: index