This commit is contained in:
@ -1,10 +1,10 @@
|
||||
import { defineStore } from "pinia";
|
||||
import keycloakService from '@/services/keycloak';
|
||||
import type Keycloak from "keycloak-js";
|
||||
export const useAuthStore = defineStore("storeAuth", {
|
||||
|
||||
const useAuthStore = defineStore("storeAuth", {
|
||||
state: () => {
|
||||
return {
|
||||
testv: true,
|
||||
authenticated: false,
|
||||
user: {
|
||||
token: "",
|
||||
@ -64,9 +64,6 @@ export const useAuthStore = defineStore("storeAuth", {
|
||||
console.error(error);
|
||||
}
|
||||
},
|
||||
test() {
|
||||
this.testv = !this.testv;
|
||||
},
|
||||
// Clear user's store data
|
||||
clearUserData() {
|
||||
this.authenticated = false;
|
||||
@ -77,4 +74,8 @@ export const useAuthStore = defineStore("storeAuth", {
|
||||
};
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
type AuthStore = ReturnType<typeof useAuthStore>
|
||||
|
||||
export {useAuthStore, type AuthStore}
|
Reference in New Issue
Block a user