update integrasi
This commit is contained in:
@@ -2,10 +2,13 @@ export default defineNuxtRouteMiddleware((to) => {
|
||||
if (to.meta.public) return
|
||||
|
||||
const { $pinia } = useNuxtApp()
|
||||
const oidc = useOidcAuth();
|
||||
|
||||
if (import.meta.client) {
|
||||
const userStore = useUserStore($pinia)
|
||||
if (!userStore.isAuthenticated) {
|
||||
if (!userStore.isAuthenticated && !oidc.loggedIn) {
|
||||
return navigateTo('/auth/login')
|
||||
// oidc.login('dev');
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user