<?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 Credential timeout in IdentityManager in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/credential-timeout-in-identitymanager/m-p/231484#M21613</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 12px; font-family: Helvetica;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;We are using ADFS to secure our portal - which is a non-ArcGIS web application. ADFS is the security store for ArcGIS Server and Portal.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Helvetica;"&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Helvetica;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;When the portal get loaded into the browser, it creates two cookies: &lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN style="font-size: 10pt;"&gt;MYagstoken: &amp;lt;cryptic_string_token&amp;gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN&gt;MYagsdetailsCookie: {"userId”:”&lt;/SPAN&gt;&lt;A class="jive-link-email-small" href="mailto:myusername@mydomain.com"&gt;myusername@mydomain.com&lt;/A&gt;&lt;SPAN&gt;”,”expires":1461627081574,"creationTime":1461623481574}&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P style="font-size: 12px; font-family: Helvetica;"&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Helvetica;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;I have verified that the content of MYagstoken is a valid token that I can use to consume secure resources. The token times out in 60 minutes.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Helvetica;"&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Helvetica;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;I am using the ArcGIS Resource Proxy from github to identify the CORS resource but not to obscure a username/password. In other words: username/password is not allowed in the proxy.config and it is the person who logged in to the portal (non-ArcGIS web application) who has obtained the token from the AGS token dispenser via the cookies.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Helvetica;"&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Helvetica;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;We are NOT using the default login UI for IdentityManager. Our identities are created “elsewhere” and are stashed in the cookies.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Helvetica;"&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Helvetica;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;When our JSAPI application gets loaded into the browser it uses the cookies create an object that is used to initiate the IdentifyManager (esriId).&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Helvetica;"&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P style="font-size: 11px; font-family: Menlo; color: #008f00;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;SPAN style="color: #011993;"&gt;&lt;STRONG&gt;var &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #559495;"&gt;MYagsdetails &lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;= &lt;/SPAN&gt;&lt;SPAN style="color: #7b248d;"&gt;&lt;STRONG&gt;JSON&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #8d8b54;"&gt;parse&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(MYagsdetailsCookie);&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;&lt;STRONG&gt;var &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #559495;"&gt;userId &lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;= &lt;/SPAN&gt;&lt;SPAN style="color: #559495;"&gt;MYagsdetails&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #7b248d;"&gt;&lt;STRONG&gt;userId&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;&lt;STRONG&gt;var &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #559495;"&gt;expires &lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;= &lt;/SPAN&gt;&lt;SPAN style="color: #559495;"&gt;MYagsdetails&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #7b248d;"&gt;&lt;STRONG&gt;expires&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;&lt;STRONG&gt;var &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #559495;"&gt;creationTime &lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;= &lt;/SPAN&gt;&lt;SPAN style="color: #559495;"&gt;MYagsdetails&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #7b248d;"&gt;&lt;STRONG&gt;creationTime&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;&lt;STRONG&gt;var &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #559495;"&gt;serverInfo &lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;= {&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #7b248d;"&gt;&lt;STRONG&gt;server&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;: &lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fwebadaptor.MyDomain.com%2Fportal" rel="nofollow" target="_blank"&gt;https://webadaptor.MyDomain.com/portal&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="color: #000000;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #929292;"&gt;&lt;EM&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #7b248d;"&gt;&lt;STRONG&gt;tokenServiceUrl&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;: &lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fwebadaptor.MyDomain.com%2Fportal%2Fsharing%2FgenerateToken%2F" rel="nofollow" target="_blank"&gt;https://webadaptor.MyDomain.com/portal/sharing/generateToken/&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="color: #000000;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #929292;"&gt;&lt;EM&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #7b248d;"&gt;&lt;STRONG&gt;hasPortal&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;: &lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;&lt;STRONG&gt;true&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;,&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #7b248d;"&gt;&lt;STRONG&gt;webTierAuth&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;: &lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;&lt;STRONG&gt;false&lt;BR /&gt; &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;};&lt;BR /&gt; &lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;&lt;STRONG&gt;var &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #559495;"&gt;credential &lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;= {&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #7b248d;"&gt;&lt;STRONG&gt;userId&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;: &lt;/SPAN&gt;&lt;SPAN style="color: #559495;"&gt;userId&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #929292;"&gt;&lt;EM&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #7b248d;"&gt;&lt;STRONG&gt;server&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;: &lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Fwebadaptor.MyDomain.com%2Fportal" rel="nofollow" target="_blank"&gt;http://webadaptor.MyDomain.com/portal&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="color: #000000;"&gt;, &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 11px; font-family: Menlo; color: #929292;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;EM&gt;&amp;nbsp; &lt;/EM&gt;&lt;SPAN style="color: #7b248d;"&gt;&lt;STRONG&gt;token&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;: MYagstoken, &lt;/SPAN&gt;&lt;EM&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/EM&gt;&lt;SPAN style="color: #7b248d;"&gt;&lt;STRONG&gt;expires&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;: &lt;/SPAN&gt;&lt;SPAN style="color: #559495;"&gt;expires&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;,&amp;nbsp; &lt;/SPAN&gt;&lt;EM&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/EM&gt;&lt;SPAN style="color: #7b248d;"&gt;&lt;STRONG&gt;validity&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;: &lt;/SPAN&gt;&lt;EM&gt;undefined&lt;/EM&gt;&lt;SPAN style="color: #000000;"&gt;,&lt;/SPAN&gt;&lt;EM&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; ssl: true, &lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/EM&gt;&lt;SPAN style="color: #7b248d;"&gt;&lt;STRONG&gt;creationTime&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;: &lt;/SPAN&gt;&lt;SPAN style="color: #559495;"&gt;creationTime&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;,&lt;/SPAN&gt;&lt;EM&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/EM&gt;&lt;SPAN style="color: #7b248d;"&gt;&lt;STRONG&gt;scope&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;: &lt;/SPAN&gt;&lt;SPAN style="color: #008f00;"&gt;&lt;STRONG&gt;"portal"&amp;nbsp; &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;EM&gt;// ”server" does not work&lt;BR /&gt; &lt;/EM&gt;&lt;SPAN style="color: #000000;"&gt;};&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 11px; font-family: Menlo;"&gt;&lt;/P&gt;&lt;P style="font-size: 11px; font-family: Menlo; color: #559495;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;SPAN style="color: #011993;"&gt;&lt;STRONG&gt;var &lt;/STRONG&gt;&lt;/SPAN&gt;idObject &lt;SPAN style="color: #000000;"&gt;= {&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #7b248d;"&gt;&lt;STRONG&gt;serverInfos&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;: [&lt;/SPAN&gt;serverInfo&lt;SPAN style="color: #000000;"&gt;],&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #7b248d;"&gt;&lt;STRONG&gt;credentials&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;: [&lt;/SPAN&gt;credential&lt;SPAN style="color: #000000;"&gt;]&lt;BR /&gt; };&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 11px; font-family: Menlo; color: #559495;"&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;&lt;SPAN style="background-color: #e4e4ff;"&gt;esriId&lt;/SPAN&gt;.&lt;SPAN style="color: #7a7a43;"&gt;initialize&lt;/SPAN&gt;(&lt;SPAN style="color: #458383;"&gt;idObject&lt;/SPAN&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P style="font-size: 12px; font-family: Helvetica;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;This successfully creates a credential that I can use for 60 minutes. There are a couple of oddities at this point:&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN style="font-size: 10pt;"&gt;The following gets executing, indicating that the IdentityManager is successfully creating a credential. It should be noted that the token is a different string, although this token is valid as well.&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'courier new', courier; font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;SPAN style="color: #000000; font-family: 'courier new', courier; font-size: 8pt;"&gt;&lt;SPAN style="color: #000000;"&gt;esriId.&lt;/SPAN&gt;&lt;SPAN style="color: #7b248d;"&gt;&lt;STRONG&gt;on&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;STRONG&gt;"credential-create"&lt;/STRONG&gt;&lt;SPAN style="color: #000000;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;&lt;STRONG&gt;function&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(e) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #7b248d;"&gt;&lt;STRONG&gt;console&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #8d8b54;"&gt;log &lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(Date().&lt;/SPAN&gt;&lt;SPAN style="color: #8d8b54;"&gt;toLocaleString&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;() + &lt;/SPAN&gt;&lt;STRONG&gt;' credential-create Credential: '&lt;/STRONG&gt;&lt;SPAN style="color: #000000;"&gt;, e.credential);&lt;BR /&gt; });&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P style="font-size: 12px; font-family: Helvetica;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;The following event NEVER gets fired, even after the 60 minutes:&lt;/SPAN&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P style="font-size: 11px; font-family: Menlo;"&gt;esriId.&lt;SPAN style="color: #7b248d;"&gt;&lt;STRONG&gt;on&lt;/STRONG&gt;&lt;/SPAN&gt;(&lt;SPAN style="color: #008f00;"&gt;&lt;STRONG&gt;"dialog-create"&lt;/STRONG&gt;&lt;/SPAN&gt;, &lt;SPAN style="color: #011993;"&gt;&lt;STRONG&gt;function&lt;/STRONG&gt;&lt;/SPAN&gt;(e) {&lt;BR /&gt;&lt;SPAN style="color: #7b248d;"&gt;&lt;STRONG&gt;console&lt;/STRONG&gt;&lt;/SPAN&gt;.&lt;SPAN style="color: #8d8b54;"&gt;log &lt;/SPAN&gt;(Date().&lt;SPAN style="color: #8d8b54;"&gt;toLocaleString&lt;/SPAN&gt;() + &lt;SPAN style="color: #008f00;"&gt;&lt;STRONG&gt;' dialog-create'&lt;/STRONG&gt;&lt;/SPAN&gt;, e);&lt;BR /&gt; });&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P style="font-size: 12px; font-family: Helvetica;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;The secured services cease to function inside the map. Pan and zoom and nothing happens. There was rich and dynamic map content for 60 minutes though… &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Helvetica;"&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Helvetica;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;There are repeated error of “Invalid Token” indicating that the token never refreshed. It was my understanding that when a credential was created by the IdentityManager.initialize, that a timer was created that refreshed the token when it’s timed out. &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Helvetica;"&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Helvetica;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;The bottom line is that there is no indication that the security has expired (&lt;SPAN style="color: #008f00;"&gt;&lt;STRONG&gt;dialog-create&lt;/STRONG&gt;&lt;/SPAN&gt;) or that a new credential is created (&lt;SPAN style="color: #008f00;"&gt;&lt;STRONG&gt;credential-create&lt;/STRONG&gt;&lt;/SPAN&gt;). FAIL.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Helvetica;"&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Helvetica;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;I’d like to do either one of two things:&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN style="font-size: 10pt;"&gt;Institutional: Inform the user that their security has timed out and that they need to launch the map app again from the portal. This is the “not preferred by acceptable” alternative&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 10pt;"&gt;Technological: Refresh the IdentityManager credential with a new token that will give me another 60 minutes. This is the preferred option. So long as the portal application can create the the cookies (soon to be local storage).&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P style="font-size: 12px; font-family: Helvetica;"&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Helvetica;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;One other item: I’ve attempted to use a timer to recreate the IdentityManager credential using the code above and the cookies generated by the portal, but without success. For reasons I don’t understand, I’m just not able to rehydrate the IdentityManager so my users can continue working in the map application.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Helvetica;"&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Helvetica;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;Hope you can help... TIA&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 25 Apr 2016 23:18:12 GMT</pubDate>
    <dc:creator>DirkVandervoort</dc:creator>
    <dc:date>2016-04-25T23:18:12Z</dc:date>
    <item>
      <title>Credential timeout in IdentityManager</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/credential-timeout-in-identitymanager/m-p/231484#M21613</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 12px; font-family: Helvetica;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;We are using ADFS to secure our portal - which is a non-ArcGIS web application. ADFS is the security store for ArcGIS Server and Portal.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Helvetica;"&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Helvetica;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;When the portal get loaded into the browser, it creates two cookies: &lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN style="font-size: 10pt;"&gt;MYagstoken: &amp;lt;cryptic_string_token&amp;gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN&gt;MYagsdetailsCookie: {"userId”:”&lt;/SPAN&gt;&lt;A class="jive-link-email-small" href="mailto:myusername@mydomain.com"&gt;myusername@mydomain.com&lt;/A&gt;&lt;SPAN&gt;”,”expires":1461627081574,"creationTime":1461623481574}&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P style="font-size: 12px; font-family: Helvetica;"&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Helvetica;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;I have verified that the content of MYagstoken is a valid token that I can use to consume secure resources. The token times out in 60 minutes.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Helvetica;"&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Helvetica;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;I am using the ArcGIS Resource Proxy from github to identify the CORS resource but not to obscure a username/password. In other words: username/password is not allowed in the proxy.config and it is the person who logged in to the portal (non-ArcGIS web application) who has obtained the token from the AGS token dispenser via the cookies.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Helvetica;"&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Helvetica;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;We are NOT using the default login UI for IdentityManager. Our identities are created “elsewhere” and are stashed in the cookies.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Helvetica;"&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Helvetica;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;When our JSAPI application gets loaded into the browser it uses the cookies create an object that is used to initiate the IdentifyManager (esriId).&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Helvetica;"&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P style="font-size: 11px; font-family: Menlo; color: #008f00;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;SPAN style="color: #011993;"&gt;&lt;STRONG&gt;var &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #559495;"&gt;MYagsdetails &lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;= &lt;/SPAN&gt;&lt;SPAN style="color: #7b248d;"&gt;&lt;STRONG&gt;JSON&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #8d8b54;"&gt;parse&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(MYagsdetailsCookie);&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;&lt;STRONG&gt;var &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #559495;"&gt;userId &lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;= &lt;/SPAN&gt;&lt;SPAN style="color: #559495;"&gt;MYagsdetails&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #7b248d;"&gt;&lt;STRONG&gt;userId&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;&lt;STRONG&gt;var &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #559495;"&gt;expires &lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;= &lt;/SPAN&gt;&lt;SPAN style="color: #559495;"&gt;MYagsdetails&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #7b248d;"&gt;&lt;STRONG&gt;expires&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;&lt;STRONG&gt;var &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #559495;"&gt;creationTime &lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;= &lt;/SPAN&gt;&lt;SPAN style="color: #559495;"&gt;MYagsdetails&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #7b248d;"&gt;&lt;STRONG&gt;creationTime&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;&lt;STRONG&gt;var &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #559495;"&gt;serverInfo &lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;= {&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #7b248d;"&gt;&lt;STRONG&gt;server&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;: &lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fwebadaptor.MyDomain.com%2Fportal" rel="nofollow" target="_blank"&gt;https://webadaptor.MyDomain.com/portal&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="color: #000000;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #929292;"&gt;&lt;EM&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #7b248d;"&gt;&lt;STRONG&gt;tokenServiceUrl&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;: &lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fwebadaptor.MyDomain.com%2Fportal%2Fsharing%2FgenerateToken%2F" rel="nofollow" target="_blank"&gt;https://webadaptor.MyDomain.com/portal/sharing/generateToken/&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="color: #000000;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #929292;"&gt;&lt;EM&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #7b248d;"&gt;&lt;STRONG&gt;hasPortal&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;: &lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;&lt;STRONG&gt;true&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;,&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #7b248d;"&gt;&lt;STRONG&gt;webTierAuth&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;: &lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;&lt;STRONG&gt;false&lt;BR /&gt; &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;};&lt;BR /&gt; &lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;&lt;STRONG&gt;var &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #559495;"&gt;credential &lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;= {&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #7b248d;"&gt;&lt;STRONG&gt;userId&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;: &lt;/SPAN&gt;&lt;SPAN style="color: #559495;"&gt;userId&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #929292;"&gt;&lt;EM&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #7b248d;"&gt;&lt;STRONG&gt;server&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;: &lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Fwebadaptor.MyDomain.com%2Fportal" rel="nofollow" target="_blank"&gt;http://webadaptor.MyDomain.com/portal&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="color: #000000;"&gt;, &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 11px; font-family: Menlo; color: #929292;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;EM&gt;&amp;nbsp; &lt;/EM&gt;&lt;SPAN style="color: #7b248d;"&gt;&lt;STRONG&gt;token&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;: MYagstoken, &lt;/SPAN&gt;&lt;EM&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/EM&gt;&lt;SPAN style="color: #7b248d;"&gt;&lt;STRONG&gt;expires&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;: &lt;/SPAN&gt;&lt;SPAN style="color: #559495;"&gt;expires&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;,&amp;nbsp; &lt;/SPAN&gt;&lt;EM&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/EM&gt;&lt;SPAN style="color: #7b248d;"&gt;&lt;STRONG&gt;validity&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;: &lt;/SPAN&gt;&lt;EM&gt;undefined&lt;/EM&gt;&lt;SPAN style="color: #000000;"&gt;,&lt;/SPAN&gt;&lt;EM&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; ssl: true, &lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/EM&gt;&lt;SPAN style="color: #7b248d;"&gt;&lt;STRONG&gt;creationTime&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;: &lt;/SPAN&gt;&lt;SPAN style="color: #559495;"&gt;creationTime&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;,&lt;/SPAN&gt;&lt;EM&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/EM&gt;&lt;SPAN style="color: #7b248d;"&gt;&lt;STRONG&gt;scope&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;: &lt;/SPAN&gt;&lt;SPAN style="color: #008f00;"&gt;&lt;STRONG&gt;"portal"&amp;nbsp; &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;EM&gt;// ”server" does not work&lt;BR /&gt; &lt;/EM&gt;&lt;SPAN style="color: #000000;"&gt;};&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 11px; font-family: Menlo;"&gt;&lt;/P&gt;&lt;P style="font-size: 11px; font-family: Menlo; color: #559495;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;SPAN style="color: #011993;"&gt;&lt;STRONG&gt;var &lt;/STRONG&gt;&lt;/SPAN&gt;idObject &lt;SPAN style="color: #000000;"&gt;= {&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #7b248d;"&gt;&lt;STRONG&gt;serverInfos&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;: [&lt;/SPAN&gt;serverInfo&lt;SPAN style="color: #000000;"&gt;],&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #7b248d;"&gt;&lt;STRONG&gt;credentials&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;: [&lt;/SPAN&gt;credential&lt;SPAN style="color: #000000;"&gt;]&lt;BR /&gt; };&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 11px; font-family: Menlo; color: #559495;"&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;&lt;SPAN style="background-color: #e4e4ff;"&gt;esriId&lt;/SPAN&gt;.&lt;SPAN style="color: #7a7a43;"&gt;initialize&lt;/SPAN&gt;(&lt;SPAN style="color: #458383;"&gt;idObject&lt;/SPAN&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P style="font-size: 12px; font-family: Helvetica;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;This successfully creates a credential that I can use for 60 minutes. There are a couple of oddities at this point:&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN style="font-size: 10pt;"&gt;The following gets executing, indicating that the IdentityManager is successfully creating a credential. It should be noted that the token is a different string, although this token is valid as well.&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'courier new', courier; font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;SPAN style="color: #000000; font-family: 'courier new', courier; font-size: 8pt;"&gt;&lt;SPAN style="color: #000000;"&gt;esriId.&lt;/SPAN&gt;&lt;SPAN style="color: #7b248d;"&gt;&lt;STRONG&gt;on&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;STRONG&gt;"credential-create"&lt;/STRONG&gt;&lt;SPAN style="color: #000000;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;&lt;STRONG&gt;function&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(e) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #7b248d;"&gt;&lt;STRONG&gt;console&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #8d8b54;"&gt;log &lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(Date().&lt;/SPAN&gt;&lt;SPAN style="color: #8d8b54;"&gt;toLocaleString&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;() + &lt;/SPAN&gt;&lt;STRONG&gt;' credential-create Credential: '&lt;/STRONG&gt;&lt;SPAN style="color: #000000;"&gt;, e.credential);&lt;BR /&gt; });&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P style="font-size: 12px; font-family: Helvetica;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;The following event NEVER gets fired, even after the 60 minutes:&lt;/SPAN&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P style="font-size: 11px; font-family: Menlo;"&gt;esriId.&lt;SPAN style="color: #7b248d;"&gt;&lt;STRONG&gt;on&lt;/STRONG&gt;&lt;/SPAN&gt;(&lt;SPAN style="color: #008f00;"&gt;&lt;STRONG&gt;"dialog-create"&lt;/STRONG&gt;&lt;/SPAN&gt;, &lt;SPAN style="color: #011993;"&gt;&lt;STRONG&gt;function&lt;/STRONG&gt;&lt;/SPAN&gt;(e) {&lt;BR /&gt;&lt;SPAN style="color: #7b248d;"&gt;&lt;STRONG&gt;console&lt;/STRONG&gt;&lt;/SPAN&gt;.&lt;SPAN style="color: #8d8b54;"&gt;log &lt;/SPAN&gt;(Date().&lt;SPAN style="color: #8d8b54;"&gt;toLocaleString&lt;/SPAN&gt;() + &lt;SPAN style="color: #008f00;"&gt;&lt;STRONG&gt;' dialog-create'&lt;/STRONG&gt;&lt;/SPAN&gt;, e);&lt;BR /&gt; });&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P style="font-size: 12px; font-family: Helvetica;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;The secured services cease to function inside the map. Pan and zoom and nothing happens. There was rich and dynamic map content for 60 minutes though… &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Helvetica;"&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Helvetica;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;There are repeated error of “Invalid Token” indicating that the token never refreshed. It was my understanding that when a credential was created by the IdentityManager.initialize, that a timer was created that refreshed the token when it’s timed out. &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Helvetica;"&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Helvetica;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;The bottom line is that there is no indication that the security has expired (&lt;SPAN style="color: #008f00;"&gt;&lt;STRONG&gt;dialog-create&lt;/STRONG&gt;&lt;/SPAN&gt;) or that a new credential is created (&lt;SPAN style="color: #008f00;"&gt;&lt;STRONG&gt;credential-create&lt;/STRONG&gt;&lt;/SPAN&gt;). FAIL.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Helvetica;"&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Helvetica;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;I’d like to do either one of two things:&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN style="font-size: 10pt;"&gt;Institutional: Inform the user that their security has timed out and that they need to launch the map app again from the portal. This is the “not preferred by acceptable” alternative&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 10pt;"&gt;Technological: Refresh the IdentityManager credential with a new token that will give me another 60 minutes. This is the preferred option. So long as the portal application can create the the cookies (soon to be local storage).&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P style="font-size: 12px; font-family: Helvetica;"&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Helvetica;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;One other item: I’ve attempted to use a timer to recreate the IdentityManager credential using the code above and the cookies generated by the portal, but without success. For reasons I don’t understand, I’m just not able to rehydrate the IdentityManager so my users can continue working in the map application.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Helvetica;"&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Helvetica;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;Hope you can help... TIA&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Apr 2016 23:18:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/credential-timeout-in-identitymanager/m-p/231484#M21613</guid>
      <dc:creator>DirkVandervoort</dc:creator>
      <dc:date>2016-04-25T23:18:12Z</dc:date>
    </item>
  </channel>
</rss>

