Logout from Keycloak is not working properly

1k Views Asked by At

when i call below code, it will go to if statement i.e. keycloak.authenticated. Aftert that keycloak.logout(), neither alert Success nor Fail will not display.

if(keycloak.authenticated) {   
  keycloak.logout().then((success) => {
        alert("Success")
    }).catch((error) => {
           alert("Fail")
    });
}

let me know where i am doing wrong.

0

There are 0 best solutions below