VITE_URL_SSO

This commit is contained in:
setthawutttty 2024-10-28 10:35:20 +07:00
parent 018e430289
commit 3aba66a07c
4 changed files with 9 additions and 4 deletions

View file

@ -1,5 +1,7 @@
const ACCESS_TOKEN = "BMAHRIS_KEYCLOAK_IDENTITY";
const key_C_Config = {
url_Logout: import.meta.env.VITE_URL_SSO,
};
interface AuthResponse {
access_token: string;
expires_in: number;
@ -15,7 +17,7 @@ async function setAuthen(r: AuthResponse) {
async function logout() {
await deleteCookie(ACCESS_TOKEN);
window.location.href = "/login";
window.location.href = key_C_Config.url_Logout;
}
async function getToken() {