logoutSSO
This commit is contained in:
parent
e3d93ca713
commit
8aa17c7648
2 changed files with 8 additions and 1 deletions
|
|
@ -87,6 +87,11 @@ async function redirectToLandingPage() {
|
|||
window.location.href = key_C_Config.landing_PageUrl;
|
||||
}
|
||||
|
||||
async function logoutSSO() {
|
||||
await deleteCookie(ACCESS_TOKEN);
|
||||
window.location.href = key_C_Config.landing_PageUrl + `/logout`;
|
||||
}
|
||||
|
||||
export {
|
||||
getToken,
|
||||
authenticated,
|
||||
|
|
@ -95,4 +100,5 @@ export {
|
|||
tokenParsed,
|
||||
getCookie,
|
||||
redirectToLandingPage,
|
||||
logoutSSO,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ import {
|
|||
tokenParsed,
|
||||
getCookie,
|
||||
redirectToLandingPage,
|
||||
logoutSSO,
|
||||
} from "@/plugins/auth";
|
||||
import checkPermission from "@/plugins/checkPermission";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
|
|
@ -249,7 +250,7 @@ function doLogout() {
|
|||
$q,
|
||||
async () => {
|
||||
await http.post(config.API.keycloakLogSSO, { text: "ออกจากระบบ" });
|
||||
await logout();
|
||||
await logoutSSO();
|
||||
},
|
||||
"ยืนยันการออกจากระบบ",
|
||||
"ต้องการออกจากระบบใช่หรือไม่?"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue