I am trying to check if the user is logged in.
Trying to use beforeEnter.
But if I just pass the function name there:
{
path: ‘/’,
component: HomePage,
beforeEnter: checkAuth
}
checkAuth function does not run.
And if i write beforeEnter: checkAuth(), i need to somehow pass the arguments (to, from, resolve, reject) to it, but this cannot be done either.