perbaikan keycloak dan hak akses pada sidebarItem, add axios, pinia, zod

This commit is contained in:
2025-06-02 12:08:55 +07:00
parent 615586c2c6
commit 87a4bdc1a8
12 changed files with 323 additions and 63 deletions

No files matched your search

@@ -1,13 +1,13 @@
<script setup lang="ts">
import { UserIcon, MailIcon, ListCheckIcon } from 'vue-tabler-icons';
const runtimeConfig = useRuntimeConfig();
const user_profile = useCookie('user_token_profile');
// const user_token = useCookie('user_token');
const user_profile = useCookie('user_profile');
const user_token = useCookie('user_token');
const logout = async () => {
console.log('Logging out...');
window.location.href = `${runtimeConfig.public.keycloakUrl}/realms/${runtimeConfig.public.keycloakRealm}/protocol/openid-connect/logout?client_id=${runtimeConfig.public.keycloakClient}&post_logout_redirect_uri=http://localhost:3000`;
// user_token.value = null;
user_profile.value = null;
user_token.value = null;
localStorage.removeItem('userProfile')
localStorage.removeItem('sidebarItems')
navigateTo('/auth/login')
}
</script>