<?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: Bypassing login screen when viewing private layers on map - is this allowed? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/bypassing-login-screen-when-viewing-private-layers/m-p/1027143#M71782</link>
    <description>&lt;P&gt;Unfortunately, what you are describing is likely a violation of the terms of use...&lt;/P&gt;&lt;P&gt;If you are hardcoding a single user's credentials in an application that multiple people will use to access private content, then that will be a violation of the Arcgis.com Terms of Use.&lt;/P&gt;&lt;P&gt;See section 2.5:&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.arcgis.com/home/termsofuse.html" target="_blank"&gt;https://www.arcgis.com/home/termsofuse.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 16 Feb 2021 13:47:14 GMT</pubDate>
    <dc:creator>TommyBramble</dc:creator>
    <dc:date>2021-02-16T13:47:14Z</dc:date>
    <item>
      <title>Bypassing login screen when viewing private layers on map - is this allowed?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/bypassing-login-screen-when-viewing-private-layers/m-p/1026092#M71748</link>
      <description>&lt;P&gt;I want to be able to bypass the login screen that is shown when trying to view private layers on a map using the JS API. I've found this solution using application credentials that works using &lt;EM&gt;client_id&lt;/EM&gt; and &lt;EM&gt;client_secret&lt;/EM&gt; after registering an application:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;      var url = "https://www.arcgis.com/sharing/rest/oauth2/token";
      var token = "";
      esriRequest(url, {
        query: {
          client_id: "CLIENT_ID",
          client_secret: "CLIENT_SECRET",
          grant_type: "client_credentials"
        },
        method: "post"
      })
        .then((response) =&amp;gt; {
          token = response.data.access_token;
          esriId.registerToken({
            server: "https://www.arcgis.com/sharing/rest",
            token: token
          })
        })
        .catch((err) =&amp;gt; {
          if (err.name === 'AbortError') {
            console.log('Request aborted');
          } else {
            console.error('Error encountered', err);
          }
        });&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;...but after checking here (&lt;A href="https://developers.arcgis.com/documentation/security-and-authentication/other-authentication-methods/application-credentials/" target="_blank" rel="noopener"&gt;https://developers.arcgis.com/documentation/security-and-authentication/other-authentication-methods/application-credentials/)&lt;/A&gt;&amp;nbsp;I'm unclear whether I'd be within the terms of use using this method. I see that under limitations I'm directed to use ArcGIS Identity to access private content, but that link details a method that requires login, which is what I'm trying to avoid (though I haven't tested the workflow that is described there). Can anyone verify whether the method above is within terms of use for the JS API? Thanks so much in advance.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Feb 2021 17:15:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/bypassing-login-screen-when-viewing-private-layers/m-p/1026092#M71748</guid>
      <dc:creator>CaralynGorman111</dc:creator>
      <dc:date>2021-02-12T17:15:46Z</dc:date>
    </item>
    <item>
      <title>Re: Bypassing login screen when viewing private layers on map - is this allowed?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/bypassing-login-screen-when-viewing-private-layers/m-p/1027143#M71782</link>
      <description>&lt;P&gt;Unfortunately, what you are describing is likely a violation of the terms of use...&lt;/P&gt;&lt;P&gt;If you are hardcoding a single user's credentials in an application that multiple people will use to access private content, then that will be a violation of the Arcgis.com Terms of Use.&lt;/P&gt;&lt;P&gt;See section 2.5:&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.arcgis.com/home/termsofuse.html" target="_blank"&gt;https://www.arcgis.com/home/termsofuse.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Feb 2021 13:47:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/bypassing-login-screen-when-viewing-private-layers/m-p/1027143#M71782</guid>
      <dc:creator>TommyBramble</dc:creator>
      <dc:date>2021-02-16T13:47:14Z</dc:date>
    </item>
  </channel>
</rss>

