<?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: Hosting Server /login URL issue, in ArcGIS Enterprise Portal Questions</title>
    <link>https://community.esri.com/t5/arcgis-enterprise-portal-questions/hosting-server-login-url-issue/m-p/1476905#M15147</link>
    <description>&lt;P&gt;Just a note that the slash issue ended up being a red herring, because the fundamental problem was that the Identity Manager in Experience Builder was intermittently invalidating the tokens it would successfully generate to access secured services.&amp;nbsp; I found that by commenting out/removing the line "this.onSessionChanged($S.ArcGISJSSync)" in jimu-core/index.js, the tokens would no longer get invalidated when the Javascript API tries to procure a token (not sure offhand why this happens).&amp;nbsp; It's a workaround solution if anyone encounters this in the future, though if there's a more elegant solution than a code change let me know.&lt;/P&gt;</description>
    <pubDate>Wed, 22 May 2024 13:43:46 GMT</pubDate>
    <dc:creator>AdamDrackley</dc:creator>
    <dc:date>2024-05-22T13:43:46Z</dc:date>
    <item>
      <title>Hosting Server /login URL issue,</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-portal-questions/hosting-server-login-url-issue/m-p/1458745#M15118</link>
      <description>&lt;P&gt;Hey everyone, hope things are well.&amp;nbsp; I had a quick question for anyone who might have run into this issue, or a similar one.&amp;nbsp; We have a Federated 10.9.1 ArcGIS Enterprise system with a standalone deployment of Experience Builder running on port :3000 on a different domain.&amp;nbsp; Occasionally, when we include Enterprise-hosted services in our ExB apps, we'll see the app receiving a 302 Found for a service call to these services, with the Response Headers containing the typical "Location" header to send the app off to authenticate against a URL similar to: "https://&amp;lt;PortalURL&amp;gt;/&lt;SPAN&gt;hosting/login?returnUrl=&amp;lt;ServiceUrl&amp;gt;.&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;The app will then follow the redirect URL.&amp;nbsp; The issue is that the URL is actually incorrect; When the browser follows that redirect, they'll get another 302 Found with a Location header directing them to https://&amp;lt;PortalURL&amp;gt;/hosting/login&lt;U&gt;&lt;STRONG&gt;/&lt;/STRONG&gt;&lt;/U&gt;?returnUrl=&amp;lt;ServiceUrl&amp;gt;, coming from the Web Adapter.&amp;nbsp; Note the trailing slash after "/login".&amp;nbsp; Because the URL doesn't take the client to ArcGIS Server, just to the Web Adapter which provides the next redirect, ArcGIS Server isn't providing the typical auto-CORS header which tells the browser that the requesting domain is friendly, so the CORS request refuses to follow the 302 and fails.&lt;BR /&gt;&lt;BR /&gt;The issue is that, because the /login URL isn't real, Chrome will spring a CORS error and refuse to follow the second 302 redirect to the provided Location.&lt;BR /&gt;&lt;BR /&gt;My question is; Is the /login URL configurable in the Enterprise config store, so I can add the appropriate slash?&amp;nbsp; Has anyone else run into this issue, or have a way to tell the Web Adapter to allow CORS requests against the "fake" /hosting/login URL so that browsers will follow the redirect to the "correct" /hosting/login/ URL?&amp;nbsp; Any thoughts folks could provide would be appreciated, many thanks.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 13 May 2024 15:56:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-portal-questions/hosting-server-login-url-issue/m-p/1458745#M15118</guid>
      <dc:creator>AdamDrackley</dc:creator>
      <dc:date>2024-05-13T15:56:28Z</dc:date>
    </item>
    <item>
      <title>Re: Hosting Server /login URL issue,</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-portal-questions/hosting-server-login-url-issue/m-p/1476905#M15147</link>
      <description>&lt;P&gt;Just a note that the slash issue ended up being a red herring, because the fundamental problem was that the Identity Manager in Experience Builder was intermittently invalidating the tokens it would successfully generate to access secured services.&amp;nbsp; I found that by commenting out/removing the line "this.onSessionChanged($S.ArcGISJSSync)" in jimu-core/index.js, the tokens would no longer get invalidated when the Javascript API tries to procure a token (not sure offhand why this happens).&amp;nbsp; It's a workaround solution if anyone encounters this in the future, though if there's a more elegant solution than a code change let me know.&lt;/P&gt;</description>
      <pubDate>Wed, 22 May 2024 13:43:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-portal-questions/hosting-server-login-url-issue/m-p/1476905#M15147</guid>
      <dc:creator>AdamDrackley</dc:creator>
      <dc:date>2024-05-22T13:43:46Z</dc:date>
    </item>
  </channel>
</rss>

