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 |
*
|
# 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
# inner getFirstGrantedRoute()
If user cannot access a route (401), we will redirect him to the first granted route
# 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 |
*
|