<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic ArcGIS API- Destroy Credentials in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-api-destroy-credentials/m-p/1164997#M77031</link>
    <description>&lt;P&gt;Good day everyone.&lt;/P&gt;&lt;P&gt;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&amp;nbsp;destoryCredentials()&amp;nbsp;method.&lt;/P&gt;&lt;P&gt;However, this does not work. Is there any&lt;A href="https://deepmaterialfr.com/" target="_self"&gt;&amp;nbsp;&lt;/A&gt;input or something that I am missing out? There is no sample code for this method and the documentation doesn't show any either.&lt;/P&gt;&lt;PRE&gt;            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();
        }&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 24 Apr 2022 07:46:30 GMT</pubDate>
    <dc:creator>TalalAhmed</dc:creator>
    <dc:date>2022-04-24T07:46:30Z</dc:date>
    <item>
      <title>ArcGIS API- Destroy Credentials</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-api-destroy-credentials/m-p/1164997#M77031</link>
      <description>&lt;P&gt;Good day everyone.&lt;/P&gt;&lt;P&gt;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&amp;nbsp;destoryCredentials()&amp;nbsp;method.&lt;/P&gt;&lt;P&gt;However, this does not work. Is there any&lt;A href="https://deepmaterialfr.com/" target="_self"&gt;&amp;nbsp;&lt;/A&gt;input or something that I am missing out? There is no sample code for this method and the documentation doesn't show any either.&lt;/P&gt;&lt;PRE&gt;            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();
        }&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 24 Apr 2022 07:46:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-api-destroy-credentials/m-p/1164997#M77031</guid>
      <dc:creator>TalalAhmed</dc:creator>
      <dc:date>2022-04-24T07:46:30Z</dc:date>
    </item>
  </channel>
</rss>

