AnsweredAssumed Answered

How to change the expiration time of the token generated in application developed using Web App Builder

Question asked by mayur.patel on Feb 5, 2018
Latest reply on Mar 18, 2020 by alberto.canivano1

I have developed an app using Web App Builder developer Edition and I am trying to change the expiration time of the token in tokenUtils.js file as below 



 var oAuthInfo =;


        var oauthReturnUrl = window.location.protocol + "//" + +

         require.toUrl("jimu") + "/oauth-callback.html";

        //OAuth will lose 'persist' query parameter if set expiration to two weeks exectly.

        oAuthInfo = new OAuthInfo({

          appId: appId,

          //expiration: 14 * 24 * 60 - 1,

          expiration: 2,

          portalUrl: portalUrl,

          authNamespace: '/',

          popup: true,

          popupCallbackUrl: oauthReturnUrl






 But while checking the response of generated token request in network tab, I am getting the token value and expiration time as below



 Hence the token is not getting expired in 2 mins as desired.