<?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 changing token duration in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/changing-token-duration/m-p/1209504#M78578</link>
    <description>&lt;P&gt;i set those properties in my oauthinfo-object:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; expiration: &lt;/SPAN&gt;&lt;SPAN&gt;200&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; minTimeUntilExpiration: &lt;/SPAN&gt;&lt;SPAN&gt;180&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;i can see in the console log that those settings are set but when i obtain an token and check&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;credential.expires the timestamp is still only 30 minutes valid.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I would like to make this period longer or it would be nice if i can obtain the refreshtoken&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;from the oauthinfo-object.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;In that case my backend can renew the access token.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Sat, 03 Sep 2022 11:18:07 GMT</pubDate>
    <dc:creator>Mannus_Etten</dc:creator>
    <dc:date>2022-09-03T11:18:07Z</dc:date>
    <item>
      <title>changing token duration</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/changing-token-duration/m-p/1209504#M78578</link>
      <description>&lt;P&gt;i set those properties in my oauthinfo-object:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; expiration: &lt;/SPAN&gt;&lt;SPAN&gt;200&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; minTimeUntilExpiration: &lt;/SPAN&gt;&lt;SPAN&gt;180&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;i can see in the console log that those settings are set but when i obtain an token and check&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;credential.expires the timestamp is still only 30 minutes valid.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I would like to make this period longer or it would be nice if i can obtain the refreshtoken&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;from the oauthinfo-object.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;In that case my backend can renew the access token.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Sat, 03 Sep 2022 11:18:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/changing-token-duration/m-p/1209504#M78578</guid>
      <dc:creator>Mannus_Etten</dc:creator>
      <dc:date>2022-09-03T11:18:07Z</dc:date>
    </item>
    <item>
      <title>Re: changing token duration</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/changing-token-duration/m-p/1209997#M78603</link>
      <description>&lt;P&gt;Here's a call using jQuery with an object that has the expiration set to 200, and the resulting token says that it's valid for '12000':&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var form = new FormData();
var settings = {
  "url": "https://www.arcgis.com/sharing/rest/oauth2/token?client_id=xxx&amp;amp;client_secret=xxx&amp;amp;grant_type=client_credentials&amp;amp;expiration=200",
  "method": "POST",
  "timeout": 0,
  "processData": false,
  "mimeType": "multipart/form-data",
  "contentType": false,
  "data": form
};

$.ajax(settings).done(function (response) {
  console.log(response);
});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Resulting token:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;{
    "access_token": "xxx..",
    "expires_in": 12000
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Client, client secret, and resulting tokens were obfuscated to protect the innocent...&lt;/P&gt;</description>
      <pubDate>Tue, 06 Sep 2022 18:02:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/changing-token-duration/m-p/1209997#M78603</guid>
      <dc:creator>JeffreyWilkerson</dc:creator>
      <dc:date>2022-09-06T18:02:11Z</dc:date>
    </item>
  </channel>
</rss>

