front_foundation #9

Closed
mohamed_maoulainine wants to merge 181 commits from front_foundation into main
Showing only changes of commit fdae3e4c04 - Show all commits

View File

@ -1,14 +1,16 @@
// file: src/plugins/authStore.js
import { useAuthStore } from "@/stores/authStore.ts";
import keycloakService from '@/services/keycloak';
import keycloakService from "@/services/keycloak";
import type { Pinia } from "pinia";
import type { AppConfig } from "vue";
// Setup auth store as a plugin so it can be accessed globally in our FE
const authStorePlugin = {
install(app: any, option: any) {
install(app: AppConfig, option: Pinia) {
const store = useAuthStore(option.pinia);
app.config.globalProperties.$store = store;
keycloakService.CallInitStore(store);
}
}
},
};
export default authStorePlugin;
export default authStorePlugin;