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.
However, this does not work. Is there any input or something that I am missing out? There is no sample code for this method and the documentation doesn't show any either.
signOut: function (isSessionTimeout) { console.log("Running signOut function"); var client = new AppClient(); self.appClient = client; var actionToId = ""; if (isSessionTimeout) { actionToId = "Ses Timeout"; } var ctx = window.AppContext, oauth; if (ctx.geoportal) oauth = ctx.geoportal.arcgisOAuth; var portalUrl = oauth.portalUrl; arcgisUtils.arcgisUrl = portalUrl; // PortalImplementation esriId._arcgisUrl = portalUrl; this.removeCookie('esri_auth', "/"); var itemName = "esriJSAPIOAuth"; esriId.destroyCredentials(); window.location.hash = "#"; window.location.reload(); //AppClient.revokeToken(); AppClient.getAccessToken(); }