update integrasi

This commit is contained in:
ari
2025-11-19 16:47:23 +07:00
parent d1fd8bb194
commit 98910563b8
5 changed files with 94 additions and 34 deletions
+4 -1
View File
@@ -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');
}
}
})