-
Notifications
You must be signed in to change notification settings - Fork 36
Open
Description
Hello
I'm new to Vue 3 and I'm trying to integrate this library with my vue application. I'm using vue router and I need access to the keycloak attributes from the useKeycloak() hook. For example:
const routes = [
{
path: '/',
name: 'Dashboard',
component: Dashboard,
},
{
path: "/:catchAll(.*)",
redirect: '/'
}
];
const router = createRouter({
history: createWebHistory(),
routes,
});
router.beforeEach((to, from, next) => {
next();
});
export default router
What I'd like to do is do some additional checks before sending to the actual route. What is the best way to access the keycloak object within the beforeEach? I've tried using the useKeycloak() but the data isn't available.
Any help would be appreciated.
Metadata
Metadata
Assignees
Labels
No labels