15 lines
475 B
TypeScript
15 lines
475 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: unknown, option: unknown) {
|
|
const store = useAuthStore(option.pinia);
|
|
app.config.globalProperties.$store = store;
|
|
keycloakService.CallInitStore(store);
|
|
},
|
|
};
|
|
|
|
export default authStorePlugin;
|