<?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: Cache credentials after closing app in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/cache-credentials-after-closing-app/m-p/739359#M9268</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your quick reply. AccountStore does look like the right road to go down, but since this is an OAuth request using Esri's AuthenticationManager, I don't have access to the user's actual username and password. Instead I get back the Credential object, and I'm not sure how I'd store that into AccountStore as that seems to be mostly a key-value store.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did also check to make sure the credentials we're passing through AddCredential have their ServiceUri set, but it didn't help in persisting through different runs of the app.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Aug 2018 19:02:08 GMT</pubDate>
    <dc:creator>ChrisDougherty</dc:creator>
    <dc:date>2018-08-10T19:02:08Z</dc:date>
    <item>
      <title>Cache credentials after closing app</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/cache-credentials-after-closing-app/m-p/739357#M9266</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm developing a Xamarin.Forms app, and using&amp;nbsp;AuthenticationManager.Current.GetCredentialAsync() to challenge the user for credentials to our Portal. We can then use&amp;nbsp;ArcGISPortal.CreateAsync(uri, cred) to get the Portal instance and access to user content and data. My question is: Is there a way to cache the Credentials object or something similar? I don't want to have to prompt the user for credentials every time they open the app, when things like tokens can last for days. I've looked at locally storing the token itself, but that doesn't help get me an authenticated ArcGISPortal object.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Aug 2018 16:49:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/cache-credentials-after-closing-app/m-p/739357#M9266</guid>
      <dc:creator>ChrisDougherty</dc:creator>
      <dc:date>2018-08-10T16:49:59Z</dc:date>
    </item>
    <item>
      <title>Re: Cache credentials after closing app</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/cache-credentials-after-closing-app/m-p/739358#M9267</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It looks like&amp;nbsp;you can use &lt;A href="https://docs.microsoft.com/en-us/xamarin/xamarin-forms/data-cloud/authentication/oauth"&gt;AccountStore &lt;/A&gt;in Xamarin Forms.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use &lt;A href="https://developers.arcgis.com/net/latest/wpf/api-reference/html/M_Esri_ArcGISRuntime_Security_AuthenticationManager_AddCredential.htm"&gt;AddCredential &lt;/A&gt;to set credentials&amp;nbsp;for your app but be sure each credential have their &lt;A href="https://developers.arcgis.com/net/latest/wpf/api-reference/html/P_Esri_ArcGISRuntime_Security_Credential_ServiceUri.htm"&gt;ServiceUri &lt;/A&gt;property also set so that Authentication Manager will know to use this credential&amp;nbsp;for the given endpoint.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Aug 2018 18:16:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/cache-credentials-after-closing-app/m-p/739358#M9267</guid>
      <dc:creator>JenniferNery</dc:creator>
      <dc:date>2018-08-10T18:16:30Z</dc:date>
    </item>
    <item>
      <title>Re: Cache credentials after closing app</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/cache-credentials-after-closing-app/m-p/739359#M9268</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your quick reply. AccountStore does look like the right road to go down, but since this is an OAuth request using Esri's AuthenticationManager, I don't have access to the user's actual username and password. Instead I get back the Credential object, and I'm not sure how I'd store that into AccountStore as that seems to be mostly a key-value store.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did also check to make sure the credentials we're passing through AddCredential have their ServiceUri set, but it didn't help in persisting through different runs of the app.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Aug 2018 19:02:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/cache-credentials-after-closing-app/m-p/739359#M9268</guid>
      <dc:creator>ChrisDougherty</dc:creator>
      <dc:date>2018-08-10T19:02:08Z</dc:date>
    </item>
  </channel>
</rss>

