<?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 Re: &amp;quot;Token&amp;quot; property does not work for FeatureLayer in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/quot-token-quot-property-does-not-work-for/m-p/76370#M6945</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;According to the doc the recommended approach is to use IdentityManager.registerToken()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#token" title="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#token"&gt;FeatureLayer | API Reference | ArcGIS API for JavaScript 4.7&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also take a look at the Application logins section of the 'Access Secure Resources' guide topic for details on using a proxy.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/latest/guide/secure-resources/index.html" title="https://developers.arcgis.com/javascript/latest/guide/secure-resources/index.html"&gt;Using secure resources | ArcGIS API for JavaScript 4.7&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 30 May 2018 16:00:16 GMT</pubDate>
    <dc:creator>KellyHutchins</dc:creator>
    <dc:date>2018-05-30T16:00:16Z</dc:date>
    <item>
      <title>"Token" property does not work for FeatureLayer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/quot-token-quot-property-does-not-work-for/m-p/76369#M6944</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I need to add feature layer to a map.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My code:&lt;/P&gt;&lt;DIV style="color: #333333; background-color: #fdf6e3; font-family: Menlo, Monaco, 'Courier New', monospace; font-weight: normal; font-size: 12px; line-height: 18px; white-space: pre;"&gt;&lt;DIV&gt;&lt;SPAN style="color: #333333;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #268bd2;"&gt;this&lt;/SPAN&gt;&lt;SPAN style="color: #333333;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #268bd2;"&gt;props&lt;/SPAN&gt;&lt;SPAN style="color: #333333;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #268bd2;"&gt;mapView&lt;/SPAN&gt;&lt;SPAN style="color: #333333;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #268bd2;"&gt;map&lt;/SPAN&gt;&lt;SPAN style="color: #333333;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #268bd2;"&gt;add&lt;/SPAN&gt;&lt;SPAN style="color: #333333;"&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #333333;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #859900;"&gt;new&lt;/SPAN&gt;&lt;SPAN style="color: #333333;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #268bd2;"&gt;FeatureLayer&lt;/SPAN&gt;&lt;SPAN style="color: #333333;"&gt;({&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #333333;"&gt; url: &lt;/SPAN&gt;&lt;SPAN style="color: #268bd2;"&gt;Config&lt;/SPAN&gt;&lt;SPAN style="color: #333333;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #268bd2;"&gt;layerUrl&lt;/SPAN&gt;&lt;SPAN style="color: #333333;"&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #333333;"&gt; token: &lt;/SPAN&gt;&lt;SPAN style="color: #268bd2;"&gt;this&lt;/SPAN&gt;&lt;SPAN style="color: #333333;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #268bd2;"&gt;props&lt;/SPAN&gt;&lt;SPAN style="color: #333333;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #268bd2;"&gt;token&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #333333;"&gt; })&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #333333;"&gt; );&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Problem 1: TypeScript returns the following error: "&lt;SPAN style="color: #333333; font-family: Menlo, Monaco, 'Courier New', monospace; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ccc4b0; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;"&gt;'token' does not exist in type 'FeatureLayerProperties'.&lt;/SPAN&gt;" I checked the type definition @types/arcgis-js-api@4.7.0, it is not defined, but 'token' exists in the documentation: &lt;A class="link-titled" href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#token" title="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#token"&gt;FeatureLayer | API Reference | ArcGIS API for JavaScript 4.7&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ok, I added type for 'token' on my own, but then we have problem 2...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Problem 2: The 'token' will not be sendt to the server. So I get a login dialog to be authenticated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My question is how to add a featureLayer to the map by using token?&lt;/P&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 May 2018 09:19:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/quot-token-quot-property-does-not-work-for/m-p/76369#M6944</guid>
      <dc:creator>deleted-user-OOe4JK-9Abnm</dc:creator>
      <dc:date>2018-05-30T09:19:21Z</dc:date>
    </item>
    <item>
      <title>Re: "Token" property does not work for FeatureLayer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/quot-token-quot-property-does-not-work-for/m-p/76370#M6945</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;According to the doc the recommended approach is to use IdentityManager.registerToken()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#token" title="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#token"&gt;FeatureLayer | API Reference | ArcGIS API for JavaScript 4.7&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also take a look at the Application logins section of the 'Access Secure Resources' guide topic for details on using a proxy.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/latest/guide/secure-resources/index.html" title="https://developers.arcgis.com/javascript/latest/guide/secure-resources/index.html"&gt;Using secure resources | ArcGIS API for JavaScript 4.7&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 May 2018 16:00:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/quot-token-quot-property-does-not-work-for/m-p/76370#M6945</guid>
      <dc:creator>KellyHutchins</dc:creator>
      <dc:date>2018-05-30T16:00:16Z</dc:date>
    </item>
    <item>
      <title>Re: "Token" property does not work for FeatureLayer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/quot-token-quot-property-does-not-work-for/m-p/76371#M6946</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you, Kelly!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did as you suggested. Added IdentityManager at the start of the app and the token was sent to the server when it needed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV style="color: #333333; background-color: #fdf6e3; font-family: Menlo, Monaco, 'Courier New', monospace; font-weight: normal; font-size: 12px; line-height: 18px; white-space: pre;"&gt;&lt;DIV&gt;&lt;SPAN style="color: #333333;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #859900;"&gt;IdentityManager&lt;/SPAN&gt;&lt;SPAN style="color: #333333;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #268bd2;"&gt;registerToken&lt;/SPAN&gt;&lt;SPAN style="color: #333333;"&gt;({&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #333333;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #2aa198;"&gt;'server'&lt;/SPAN&gt;&lt;SPAN style="color: #333333;"&gt;: &lt;/SPAN&gt;&lt;SPAN style="color: #2aa198;"&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%2Fservices....%2Farcgis%2Frest%2Fservices%2F" rel="nofollow" target="_blank"&gt;https://services..../arcgis/rest/services/&lt;/A&gt;&lt;SPAN&gt;'&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #333333;"&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #333333;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #2aa198;"&gt;'token'&lt;/SPAN&gt;&lt;SPAN style="color: #333333;"&gt;: &lt;/SPAN&gt;&lt;SPAN style="color: #268bd2;"&gt;token&lt;/SPAN&gt;&lt;SPAN style="color: #333333;"&gt;.value&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #333333;"&gt; });&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I still wondering why you have "token" as &lt;SPAN class=""&gt;&lt;A href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String" target="_blank"&gt;String&lt;/A&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt; in the documentation? It did not work for me. It is not even defined in types (typescript) for 4.7. Is IdentityManager only way it works?&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jun 2018 09:45:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/quot-token-quot-property-does-not-work-for/m-p/76371#M6946</guid>
      <dc:creator>deleted-user-OOe4JK-9Abnm</dc:creator>
      <dc:date>2018-06-12T09:45:40Z</dc:date>
    </item>
  </channel>
</rss>

