perbaikan keycloak dan hak akses pada sidebarItem, add axios, pinia, zod
This commit is contained in:
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>
|
||||
|
||||
Reference in New Issue
Block a user