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