What is default token expiration and how to extend.

1740
2
02-02-2017 10:09 AM
TL2
by
Occasional Contributor III

What is the default token expiration.  Based on the code it seems to be 5 hours, however, I seem to have to log back in after 30 minutes.  

There is a multiplier in the code, 10000, that I can edit to get a longer token, but it seems to not work.  Where does the qml request token time.  When I generate token in portal I get to choose the expiration...

  var now = new Date();
                _portal.lastRenewed = now;
                _portal.expires = new Date(now.getTime() + response.expires_in*10000);
                console.log("Token expires at : ", expires.toLocaleString());
                timer.interval = _portal.expires - Date.now() - 5000;
                timer.start();
0 Kudos
2 Replies
TL2
by
Occasional Contributor III

After speaking with ESRI Support it appears as if the Survey123 Token is set to expire after 30 minutes.  I see no reason why this should not be longer, collector lasts for days.  Is there a way to extend this within the code?  

0 Kudos
Sam_Keast
New Contributor II

Is the Survey123 token still set to expire after 30 minutes? This should absolutely be customisable

0 Kudos