<?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 Flex Mobile and OAuth Question in ArcGIS API for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/flex-mobile-and-oauth-question/m-p/622773#M13838</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;We are adding OAuth to a Flex Mobile app. We've looked at the online samples, but see none for Flex Mobile. We have the following:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&amp;nbsp;&amp;nbsp; public function login():void
&amp;nbsp;&amp;nbsp; { 
&amp;nbsp;&amp;nbsp;&amp;nbsp; //Oath authentication - App id
&amp;nbsp;&amp;nbsp;&amp;nbsp; var oAuthInfo:OAuthInfo = new OAuthInfo("........");
&amp;nbsp;&amp;nbsp;&amp;nbsp; IdentityManager.instance.registerOAuthInfos([ oAuthInfo ]);
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; IdentityManager.instance.enabled = true;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; defaultQueryParameters = new PortalQueryParameters();
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; portalService = new Portal();
&amp;nbsp;&amp;nbsp;&amp;nbsp; portalService.addEventListener(FaultEvent.FAULT, esriService_faultHandler);
&amp;nbsp;&amp;nbsp;&amp;nbsp; portalService.addEventListener(PortalEvent.LOAD, portalService_loadHandler);
&amp;nbsp;&amp;nbsp;&amp;nbsp; portalService.addEventListener(PortalEvent.QUERY_ITEMS_COMPLETE, portalService_queryItemsCompleteHandler);
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; portalService.url = serverURL;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; portalService.signIn();
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp; }&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This works just fine, but we suspect we are missing some pieces for full OAuth. Could somebody let us know if we are correct, and what else we need add?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;--Matt&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 30 Sep 2013 20:35:15 GMT</pubDate>
    <dc:creator>MattSheehan</dc:creator>
    <dc:date>2013-09-30T20:35:15Z</dc:date>
    <item>
      <title>Flex Mobile and OAuth Question</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/flex-mobile-and-oauth-question/m-p/622773#M13838</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;We are adding OAuth to a Flex Mobile app. We've looked at the online samples, but see none for Flex Mobile. We have the following:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&amp;nbsp;&amp;nbsp; public function login():void
&amp;nbsp;&amp;nbsp; { 
&amp;nbsp;&amp;nbsp;&amp;nbsp; //Oath authentication - App id
&amp;nbsp;&amp;nbsp;&amp;nbsp; var oAuthInfo:OAuthInfo = new OAuthInfo("........");
&amp;nbsp;&amp;nbsp;&amp;nbsp; IdentityManager.instance.registerOAuthInfos([ oAuthInfo ]);
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; IdentityManager.instance.enabled = true;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; defaultQueryParameters = new PortalQueryParameters();
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; portalService = new Portal();
&amp;nbsp;&amp;nbsp;&amp;nbsp; portalService.addEventListener(FaultEvent.FAULT, esriService_faultHandler);
&amp;nbsp;&amp;nbsp;&amp;nbsp; portalService.addEventListener(PortalEvent.LOAD, portalService_loadHandler);
&amp;nbsp;&amp;nbsp;&amp;nbsp; portalService.addEventListener(PortalEvent.QUERY_ITEMS_COMPLETE, portalService_queryItemsCompleteHandler);
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; portalService.url = serverURL;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; portalService.signIn();
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp; }&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This works just fine, but we suspect we are missing some pieces for full OAuth. Could somebody let us know if we are correct, and what else we need add?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;--Matt&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Sep 2013 20:35:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/flex-mobile-and-oauth-question/m-p/622773#M13838</guid>
      <dc:creator>MattSheehan</dc:creator>
      <dc:date>2013-09-30T20:35:15Z</dc:date>
    </item>
    <item>
      <title>Re: Flex Mobile and OAuth Question</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/flex-mobile-and-oauth-question/m-p/622774#M13839</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;To make it work with the defaults, you just need to make sure that your app registration allows the "urn:ietf:wg:oauth:2.0:oob" redirect URI. Additional functionality you may want to add to your app is to allow the user to sign out. See:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="https://developers.arcgis.com/en/flex/api-reference/com/esri/ags/components/IdentityManager.html#signOut()"&gt;https://developers.arcgis.com/en/flex/api-reference/com/esri/ags/components/IdentityManager.html#signOut()&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Oct 2013 16:53:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/flex-mobile-and-oauth-question/m-p/622774#M13839</guid>
      <dc:creator>DasaPaddock</dc:creator>
      <dc:date>2013-10-01T16:53:37Z</dc:date>
    </item>
  </channel>
</rss>

