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
@ -2,9 +2,11 @@
|
||||
|
||||
import { useAuthStore } from "@/stores/authStore.ts";
|
||||
import keycloakService from "@/services/keycloak";
|
||||
import type { Pinia } from "pinia";
|
||||
import type { App } from "vue";
|
||||
// Setup auth store as a plugin so it can be accessed globally in our FE
|
||||
const authStorePlugin = {
|
||||
install(app: unknown, option: unknown) {
|
||||
install(app: App, option: { pinia: Pinia }) {
|
||||
const store = useAuthStore(option.pinia);
|
||||
app.config.globalProperties.$store = store;
|
||||
keycloakService.CallInitStore(store);
|
||||
|
Reference in New Issue
Block a user