check role

This commit is contained in:
Warunee Tamkoo 2024-08-19 11:19:20 +07:00
parent 9f4aeec575
commit b9b8bac836
3 changed files with 31 additions and 9 deletions

View file

@ -15,7 +15,7 @@ const keycloak = new Keycloak(keycloakConfig);
async function kcAuthen(access_token: string, refresh_token: string) {
await setCookie(ACCESS_TOKEN, access_token, 1);
await setCookie(REFRESH_TOKEN, refresh_token, 1);
window.location.href = "/";
window.location.href = "/login";
}
async function kcLogout() {