Hi Ibrahim,
Firstly you should create a file named: logout.xscfunc and paste the following code:
{
"library": "libxsauthenticator",
"factory": "createApp",
"method": "logout"
}
Then use this function in your shell:
logout:function(){
jQuery.ajax({
url: "/tbox/logout.xscfunc", // for different servers cross-domain restrictions need to be handled
type: 'POST',
dataType: "json",
success: function(data, s, xhr) { // callback called when data is received
document.location.reload(true);
},
error: function(jqXHR, textStatus, errorThrown) {
document.location.reload(true);
}
});
},
Hope this helps.