front_foundation #13
.gitea/workflows
.gitignoreDocumentation/openapi
MakefileMyINPulse-back/src
main
java
enseirb
myinpulse
config
controller
model
repository
service
resources
test
java
config
documentation/openapi
front
Dockerfile
MyINPulse-front
fake_data
package-lock.jsonpackage.jsonsrc
App.vue
components
AddProjectForm.vueAgendaComponent.vueLoginComponent.vuePendingProjectComponent.vueProjectComponent.vue
main.tscanvas
icons
plugins
router
services
stores
views
keycloak
@ -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;
|
Reference in New Issue
Block a user