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.