remove keycloak use cookie auth

This commit is contained in:
Warunee Tamkoo 2024-08-28 15:29:09 +07:00
parent 035db71697
commit 5a5e37c12d
27 changed files with 501 additions and 440 deletions

View file

@ -3,7 +3,7 @@ import "moment/dist/locale/th";
import moment from "moment";
import CustomComponent from "@/components/CustomDialog.vue";
import { Loading, QSpinnerCube } from "quasar";
import { kcLogout } from "@/plugins/keycloak";
import { logout } from "@/plugins/auth";
moment.locale("th");
@ -362,7 +362,7 @@ export const useCounterMixin = defineStore("mixin", () => {
},
}).onCancel(async () => {
showLoader();
await kcLogout();
await logout();
setTimeout(() => {
hideLoader();
}, 1000);
@ -379,7 +379,7 @@ export const useCounterMixin = defineStore("mixin", () => {
onlycancel: true,
},
});
} else {
} else if (e.response.data.status != 403) {
const message = e.response.data.result ?? e.response.data.message;
q.dialog({
component: CustomComponent,
@ -406,7 +406,7 @@ export const useCounterMixin = defineStore("mixin", () => {
},
}).onCancel(async () => {
showLoader();
await kcLogout();
await logout();
setTimeout(() => {
hideLoader();
}, 1000);
@ -424,7 +424,7 @@ export const useCounterMixin = defineStore("mixin", () => {
},
}).onCancel(async () => {
showLoader();
await kcLogout();
await logout();
setTimeout(() => {
hideLoader();
}, 1000);