<?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: Unity: Oauth2 authentication not working for private data in ArcGIS Maps SDK for Unity Questions</title>
    <link>https://community.esri.com/t5/arcgis-maps-sdk-for-unity-questions/unity-oauth2-authentication-not-working-for/m-p/1198751#M68</link>
    <description>&lt;P&gt;Hi Matt,&lt;/P&gt;&lt;P&gt;Returned to this today.&lt;/P&gt;&lt;P&gt;Thank you for the pointer in the right direction. I now have authentication working, but only in the Unity editor and simulator. This works using an http localhost url (e.g. &lt;A href="http://localhost:3000" target="_blank"&gt;http://localhost:3000&lt;/A&gt;)...&lt;/P&gt;&lt;P&gt;... However I've so far been unable to get ArcGIS auth working on the Oculus goggles. Following steps &lt;A href="https://developers.arcgis.com/unity/authentication/" target="_self"&gt;here&lt;/A&gt;, and trying an https url I see this (expected) error in the logs...&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;16:04:20.617 11913 12324 E Unity : One or more errors occurred. (Invalid redirect URI)
16:04:20.617 11913 12324 E Unity : Esri.ArcGISMapsSDK.Samples.Security.&amp;lt;&amp;gt;c__DisplayClass1_0:&amp;lt;HandleChallenge&amp;gt;b__0(Task`1)&lt;/LI-CODE&gt;&lt;P&gt;... This is expected since the Esri sample code rejects both http and https urls. Then, to break it really good... I tried a simple string (guid), but that fails: it does not create a valid URI in the sample code...&lt;/P&gt;&lt;P&gt;... doing more research, it looks like this could work by implementing a deep link for my Oculus app, and then using that url for the Esri redirect URI. Can anyone confirm that this is the approach? Is there a simpler approach out there?&lt;/P&gt;&lt;P&gt;I realize this is veering away from an Esri Unity question, but much appreciated if someone has sorted this.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;-Cory&lt;/P&gt;</description>
    <pubDate>Tue, 02 Aug 2022 21:26:47 GMT</pubDate>
    <dc:creator>coryeicher</dc:creator>
    <dc:date>2022-08-02T21:26:47Z</dc:date>
    <item>
      <title>Unity: Oauth2 authentication not working for private data</title>
      <link>https://community.esri.com/t5/arcgis-maps-sdk-for-unity-questions/unity-oauth2-authentication-not-working-for/m-p/1182895#M3</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have some Scene Layers in ArcGIS Online that are shared only within my organization. I would like to view these in a Unity Scene.&amp;nbsp;I followed the steps here without any success:&amp;nbsp;&lt;A href="https://developers.arcgis.com/unity/authentication/" target="_blank" rel="noopener"&gt;https://developers.arcgis.com/unity/authentication/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Regardless of what I enter, I never see this: &lt;STRONG&gt;"&lt;/STRONG&gt;&lt;SPAN&gt;&lt;STRONG&gt;the log in window will open in the default web browser window"&lt;/STRONG&gt;. As a result, my private data do not display in Unity.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I _am_ however able to view my private data in Unity if I use the AGS developer "&lt;SPAN&gt;Temporary Token" as my Unity API Key. I am also able to view my public AGOL data in Unity.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;What further tips are out there for setting up Oauth2 to work to display private web scenes in Unity?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is the redirect Url important, or does it only need to match (what I configure in Unity === what I have in AGS developer)?&lt;/P&gt;&lt;P&gt;Is the client secret used at all? The doc does not mention using it.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;-Cory&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jun 2022 20:05:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-maps-sdk-for-unity-questions/unity-oauth2-authentication-not-working-for/m-p/1182895#M3</guid>
      <dc:creator>coryeicher</dc:creator>
      <dc:date>2022-06-14T20:05:59Z</dc:date>
    </item>
    <item>
      <title>Re: Unity: Oauth2 authentication not working for private data</title>
      <link>https://community.esri.com/t5/arcgis-maps-sdk-for-unity-questions/unity-oauth2-authentication-not-working-for/m-p/1184343#M8</link>
      <description>&lt;P&gt;Checking in.&lt;/P&gt;&lt;P&gt;Does anyone have oAuth2 working with this SDK?&lt;/P&gt;&lt;P&gt;Having set up oAuth2 for play mode, I can see these 2 breakpoints in&amp;nbsp;OAuthChallengeHandlersInitializer.cs being hit... however neither method in&amp;nbsp;SampleDesktopOAuthAuthenticationChallengeHandler.cs are ever hit.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="coryeicher_0-1655738365050.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/43837iA8970D8845DE9895/image-size/medium?v=v2&amp;amp;px=400" role="button" title="coryeicher_0-1655738365050.png" alt="coryeicher_0-1655738365050.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;And again, my browser isn't ever opening to ask for credentials, and my private data are not displaying (using oauth2).&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;-Cory&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jun 2022 15:21:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-maps-sdk-for-unity-questions/unity-oauth2-authentication-not-working-for/m-p/1184343#M8</guid>
      <dc:creator>coryeicher</dc:creator>
      <dc:date>2022-06-20T15:21:05Z</dc:date>
    </item>
    <item>
      <title>Re: Unity: Oauth2 authentication not working for private data</title>
      <link>https://community.esri.com/t5/arcgis-maps-sdk-for-unity-questions/unity-oauth2-authentication-not-working-for/m-p/1194259#M40</link>
      <description>&lt;P&gt;Have you setup the application on your arcgis online account with valid redirect URIs?&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jul 2022 23:58:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-maps-sdk-for-unity-questions/unity-oauth2-authentication-not-working-for/m-p/1194259#M40</guid>
      <dc:creator>Matt_Nelson</dc:creator>
      <dc:date>2022-07-20T23:58:37Z</dc:date>
    </item>
    <item>
      <title>Re: Unity: Oauth2 authentication not working for private data</title>
      <link>https://community.esri.com/t5/arcgis-maps-sdk-for-unity-questions/unity-oauth2-authentication-not-working-for/m-p/1198751#M68</link>
      <description>&lt;P&gt;Hi Matt,&lt;/P&gt;&lt;P&gt;Returned to this today.&lt;/P&gt;&lt;P&gt;Thank you for the pointer in the right direction. I now have authentication working, but only in the Unity editor and simulator. This works using an http localhost url (e.g. &lt;A href="http://localhost:3000" target="_blank"&gt;http://localhost:3000&lt;/A&gt;)...&lt;/P&gt;&lt;P&gt;... However I've so far been unable to get ArcGIS auth working on the Oculus goggles. Following steps &lt;A href="https://developers.arcgis.com/unity/authentication/" target="_self"&gt;here&lt;/A&gt;, and trying an https url I see this (expected) error in the logs...&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;16:04:20.617 11913 12324 E Unity : One or more errors occurred. (Invalid redirect URI)
16:04:20.617 11913 12324 E Unity : Esri.ArcGISMapsSDK.Samples.Security.&amp;lt;&amp;gt;c__DisplayClass1_0:&amp;lt;HandleChallenge&amp;gt;b__0(Task`1)&lt;/LI-CODE&gt;&lt;P&gt;... This is expected since the Esri sample code rejects both http and https urls. Then, to break it really good... I tried a simple string (guid), but that fails: it does not create a valid URI in the sample code...&lt;/P&gt;&lt;P&gt;... doing more research, it looks like this could work by implementing a deep link for my Oculus app, and then using that url for the Esri redirect URI. Can anyone confirm that this is the approach? Is there a simpler approach out there?&lt;/P&gt;&lt;P&gt;I realize this is veering away from an Esri Unity question, but much appreciated if someone has sorted this.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;-Cory&lt;/P&gt;</description>
      <pubDate>Tue, 02 Aug 2022 21:26:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-maps-sdk-for-unity-questions/unity-oauth2-authentication-not-working-for/m-p/1198751#M68</guid>
      <dc:creator>coryeicher</dc:creator>
      <dc:date>2022-08-02T21:26:47Z</dc:date>
    </item>
    <item>
      <title>Re: Unity: Oauth2 authentication not working for private data</title>
      <link>https://community.esri.com/t5/arcgis-maps-sdk-for-unity-questions/unity-oauth2-authentication-not-working-for/m-p/1203560#M103</link>
      <description>&lt;P&gt;Hi Cory,&lt;BR /&gt;&lt;BR /&gt;Yes the deep link approach is the correct solution. Have you attempted it yet?&lt;/P&gt;</description>
      <pubDate>Tue, 16 Aug 2022 23:16:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-maps-sdk-for-unity-questions/unity-oauth2-authentication-not-working-for/m-p/1203560#M103</guid>
      <dc:creator>Matt_Nelson</dc:creator>
      <dc:date>2022-08-16T23:16:48Z</dc:date>
    </item>
    <item>
      <title>Re: Unity: Oauth2 authentication not working for private data</title>
      <link>https://community.esri.com/t5/arcgis-maps-sdk-for-unity-questions/unity-oauth2-authentication-not-working-for/m-p/1211614#M151</link>
      <description>&lt;P&gt;Hi Matt Thank you. Auth ended up being deprioritized, so I have not yet attempted.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Sep 2022 15:01:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-maps-sdk-for-unity-questions/unity-oauth2-authentication-not-working-for/m-p/1211614#M151</guid>
      <dc:creator>coryeicher</dc:creator>
      <dc:date>2022-09-12T15:01:45Z</dc:date>
    </item>
  </channel>
</rss>

