perbaikan setting pinia dan simpan user role belum fix, ad env.example

This commit is contained in:
2025-06-05 15:20:22 +07:00
parent 35772f38c9
commit fe32e13ca4
16 changed files with 514 additions and 87 deletions
+3
View File
@@ -1,11 +1,14 @@
<script setup lang="ts">
import { ref } from 'vue';
import {useSession} from 'h3'
const { $encodeBase64 } = useNuxtApp();
const loginKeycloack = async () => {
const cookies = useCookie('user_token');
try {
const response = await $fetch('/api/auth/login', { method: 'POST', mode: 'no-cors' }).then((response) => {
console.log(response);
useSession(event,{password:'80d42cfb-1cd2-462c-8f17-e3237d9027e9'})
if (response.callbackURL !== null || response.callbackURL !== undefined || response.callbackURL !== '') {
cookies.value = $encodeBase64('ini_token_user');
window.location.href = response.callbackURL