<?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: Javascript API ArcGIS Online sign in error in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-api-arcgis-online-sign-in-error/m-p/508097#M47248</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It is a development environment but I am running it through HTTPS on my IIS. I have also tried the work around you provided and it is still not working. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The error in FireBug is telling me XMLHttpRequest cannot load..... &lt;/SPAN&gt;&lt;A href="https://127.0.0.1"&gt;https://127.0.0.1&lt;/A&gt;&lt;SPAN&gt; is not allowed by Access-Control-Allow-Origin.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Then 3:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;TypeErrors&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It is some kind of security issue and I do not know very much about this area. Is there anything else you can suggest that may help to get this working??&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 29 Aug 2012 16:27:36 GMT</pubDate>
    <dc:creator>LukeStewart</dc:creator>
    <dc:date>2012-08-29T16:27:36Z</dc:date>
    <item>
      <title>Javascript API ArcGIS Online sign in error</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-api-arcgis-online-sign-in-error/m-p/508095#M47246</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am developing an application and trying to use the Portal tools now built into the JS API. I have managed to get it searching ArcGIS Online items and add them to the map but am having issues trying to sign into my organisational account to view private items. I am using the code from the samples (below) to try and sign in. It worked a couple of times but I can now not get it to sign in and have made no changes to the code that would break it. I get the error in the attached image in firebug.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Can anyone shed any light on this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;function signIn() {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;var signInLink = dojo.byId('signIn');&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;if (signInLink.innerHTML.indexOf('In') !== -1) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;portal.signIn().then(function (loggedInUser) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;signInLink.innerHTML = "Sign Out";&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}, function (error) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;signInLink.innerHTML = 'Sign In'; //error so reset sign in link&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;});&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;} else {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;portal.signOut().then(function (portalInfo) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;signInLink.innerHTML = "Sign In";&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;});&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;} &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]17281[/ATTACH]&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Aug 2012 10:28:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-api-arcgis-online-sign-in-error/m-p/508095#M47246</guid>
      <dc:creator>LukeStewart</dc:creator>
      <dc:date>2012-08-28T10:28:16Z</dc:date>
    </item>
    <item>
      <title>Re: Javascript API ArcGIS Online sign in error</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-api-arcgis-online-sign-in-error/m-p/508096#M47247</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Luke,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;signIn uses the Identity Manager to allow users to enter their credentials. The IdentityManager requires SSL because we don't want to send credentials via non-SSL channels. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you are in a development/testing machine that doesn't have a valid SSL certificate you can override the restriction using something like the code below to test the sign-in process. Just remember to remove this code before moving to a production environment. &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; dojo.addOnLoad(function() {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; esri.config.defaults.io.proxyUrl = proxyUrl;
 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; esri.id.setProtocolErrorHandler(function() {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // return true from this handler if you want to proceed anyway
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // with the protocol mismatch
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return window.confirm("This application is going to send your credentials across a non secure protocal.&amp;nbsp; Proceed?");
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });
&amp;nbsp;&amp;nbsp;&amp;nbsp; });&amp;nbsp; 

&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 22:15:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-api-arcgis-online-sign-in-error/m-p/508096#M47247</guid>
      <dc:creator>KellyHutchins</dc:creator>
      <dc:date>2021-12-11T22:15:56Z</dc:date>
    </item>
    <item>
      <title>Re: Javascript API ArcGIS Online sign in error</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-api-arcgis-online-sign-in-error/m-p/508097#M47248</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It is a development environment but I am running it through HTTPS on my IIS. I have also tried the work around you provided and it is still not working. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The error in FireBug is telling me XMLHttpRequest cannot load..... &lt;/SPAN&gt;&lt;A href="https://127.0.0.1"&gt;https://127.0.0.1&lt;/A&gt;&lt;SPAN&gt; is not allowed by Access-Control-Allow-Origin.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Then 3:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;TypeErrors&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It is some kind of security issue and I do not know very much about this area. Is there anything else you can suggest that may help to get this working??&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Aug 2012 16:27:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-api-arcgis-online-sign-in-error/m-p/508097#M47248</guid>
      <dc:creator>LukeStewart</dc:creator>
      <dc:date>2012-08-29T16:27:36Z</dc:date>
    </item>
    <item>
      <title>Re: Javascript API ArcGIS Online sign in error</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-api-arcgis-online-sign-in-error/m-p/508098#M47249</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I finally figured this one out. In the end it has nothing to do with SSL or permissions and everything to do with ####.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I had &amp;lt;a href="#"&amp;nbsp; tags in my JS and when clicking on links with this syntx a # was added to the end of the main url e.g something/something.html#. This # was subsequently causing the ArcGIS Online login to fail. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have now removed all the #'s and the login is working fine. Of course this has meant some other parts of the application do not work in certain browsers but that is another story.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Sep 2012 16:26:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-api-arcgis-online-sign-in-error/m-p/508098#M47249</guid>
      <dc:creator>LukeStewart</dc:creator>
      <dc:date>2012-09-13T16:26:19Z</dc:date>
    </item>
  </channel>
</rss>

