Good day everyone.
I am currently having troubles removing a user access token on my project. Everything runs well except I can't delete or remove the token when signing out of the account in my project. I have currently tried using the Identity Manager destoryCredentials() method as well as the revokeToken().
However, this does not work. Is there any input or something that I am missing out?
signOut: function () {
var client = new AppClient();
self.appClient = client;
var ctx = window.AppContext,
oauth;
if (ctx.geoportal) oauth = ctx.geoportal.arcgisOAuth; //Get OAuth Data
var portalUrl = oauth.portalUrl;
arcgisUtils.arcgisUrl = portalUrl; // PortalImplementation
esriId._arcgisUrl = portalUrl;
this.removeCookie('esri_auth', "/");
var itemName = "esriJSAPIOAuth";
window.sessionStorage.removeItem(itemName);
window.sessionStorage.removeItem("userRole");
window.sessionStorage.removeItem("userOrganisation");
window.sessionStorage.removeItem("userObjectId");
window.sessionStorage.removeItem("contactOrganisation");
window.sessionStorage.removeItem("distributionOrganisation");
window.sessionStorage.removeItem("fileId");
esriId.destroyCredentials();
AppClient.revokeToken();
window.location.reload();
}