Closed abhaygitty closed 3 years ago
cc @sameerag @jasonnutter - can we provide some guidance here?
@tushargupta51 Facing the same issue as above mentioned, AcquireToken() always returns cached Token even after expireOffSetSeconds is reset
@abhaygitty Have U found any workaround?
Closing, as assuming this has been resolved. ADAL.js is no longer actively maintained, so we highly recommend moving to MSAL.js.
If you have further questions, please open a new issue in the MSAL.js repo: https://github.com/AzureAD/microsoft-authentication-library-for-js/issues
@tushargupta51 I am trying to renew the token with a custom expiration offset value from config. But I don't think, that the acquireToken() method works as expected. I meant, the expiration time of the token doesn't get updated after being reset to 0 in the getCachedToken() ` /**
@returns {string} token if if it exists and not expired, otherwise null. */ AuthenticationContext.prototype.getCachedToken = function (resource) { if (!this._hasResource(resource)) { return null; }
};`
Further the renewIdToken() function is called due to the null token returned from the getCachedToken() function.
Here in the above function, the RENEW_STATUS doesn't change to complete. Therefore, I tried invoking the handleWindowCallBack() funtion (within which there's a call to the saveTokenFromHash() function which writes the token and the expiration Epochs to the sessionStorage and also does switch the status from "In progress" to "Completed" as seen below) which again fails to run as the window.location.hash is empty.
In addition to the above problem, I would also like to know, "when does the window.location.hash field get its value written?"
Please do guide me on what's wrong with what I am doing. Thanks in advance.
Originally posted by @abhaygitty in https://github.com/AzureAD/azure-activedirectory-library-for-js/issues/290#issuecomment-490687297