Module

router-middlewares

Methods

# async inner autoLogin(to, from, next)

Vue router middleware Will try to autologin using the stored credentials (JWT token)

Parameters:
Name Type Description
to *
from *
next *

View Source router/router-middlewares.js, line 247

# async inner beforeEach()

If login -> if alerts -> proceed to login If login -> if requires auth -> proceed to login If login -> if no alerts/require auth, try autologin If no login -> *require auth

*require auth: redirect to the login screen if not logged

View Source router/router-middlewares.js, line 50

# inner getFirstGrantedRoute()

If user cannot access a route (401), we will redirect him to the first granted route

View Source router/router-middlewares.js, line 36

# async inner requireAuth(to, from, next)

Vue router middleware (auth guard) Will redirect to the login screen if not logged

Parameters:
Name Type Description
to *
from *
next *

View Source router/router-middlewares.js, line 133