update BF
This commit is contained in:
@@ -6,7 +6,7 @@ export default defineNuxtRouteMiddleware(async (to) => {
|
||||
|
||||
const { $pinia } = useNuxtApp()
|
||||
|
||||
const { initKeycloak, isAuthenticated} = useKeycloak(); // global composable
|
||||
const { initKeycloak, isAuthenticated, getResponse} = useKeycloak(); // global composable
|
||||
await initKeycloak("check-sso");
|
||||
|
||||
if (import.meta.client) {
|
||||
@@ -14,7 +14,9 @@ export default defineNuxtRouteMiddleware(async (to) => {
|
||||
if (!userStore.isAuthenticated && !isAuthenticated.value) {
|
||||
return navigateTo('/auth/login')
|
||||
} else {
|
||||
console.log("its logged in!!! ")
|
||||
if (isAuthenticated.value) {
|
||||
await getResponse()
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user