perbaikan setting pinia dan simpan user role belum fix, ad env.example
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user