You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 26, 2021. It is now read-only.
In 1.0.14, it obtained the _renewStates from the iframe parent. But in 1.1.16, this information seems to be lost, so the match checking doesnt work.
// external api requests may have many renewtoken requests for different resource
if (!requestInfo.stateMatch && window.parent && window.parent.AuthenticationContext) {
var statesInParentContext = window.parent.AuthenticationContext()._renewStates;
for (var i = 0; i < statesInParentContext.length; i++) {
if (statesInParentContext[i] === requestInfo.stateResponse) {
requestInfo.requestType = this.REQUEST_TYPE.RENEW_TOKEN;
requestInfo.stateMatch = true;
break;
}
}
}
In the new version I cant see any places where this variable is saved. So when it tries to compare the state in getRequestInfo it doesn't match.
// external api requests may have many renewtoken requests for different resource
if (!requestInfo.stateMatch && window.parent) {
requestInfo.requestType = this._requestType;
var statesInParentContext = this._renewStates;
for (var i = 0; i < statesInParentContext.length; i++) {
if (statesInParentContext[i] === requestInfo.stateResponse) {
requestInfo.stateMatch = true;
break;
}
}
}
Thanks
The text was updated successfully, but these errors were encountered:
Since self refers to the parent instance, it should have the states defined which were saved earlier.
Closing this issue as it is not a bug in the library. Please reopen if you still have issues.
I'm currently using adal-angular4 which uses your library. I think his code needs to be refactored, with the latest 1.0.16 changes. Otherwise the _renewStates is empty when calling getRequestInfo.
Adal4Service.prototype.handleWindowCallback = function () {
var hash = window.location.hash;
if (this.adalContext.isCallback(hash)) {
var requestInfo = this.adalContext.getRequestInfo(hash);
this.adalContext.saveTokenFromHash(requestInfo);
if (requestInfo.requestType === this.adalContext.REQUEST_TYPE.LOGIN) {
this.updateDataFromCache(this.adalContext.config.loginResource);
}
..
..
My work around for now is to maybe use your library directly.
Hi,
In 1.0.14, it obtained the _renewStates from the iframe parent. But in 1.1.16, this information seems to be lost, so the match checking doesnt work.
// external api requests may have many renewtoken requests for different resource
if (!requestInfo.stateMatch && window.parent && window.parent.AuthenticationContext) {
var statesInParentContext = window.parent.AuthenticationContext()._renewStates;
for (var i = 0; i < statesInParentContext.length; i++) {
if (statesInParentContext[i] === requestInfo.stateResponse) {
requestInfo.requestType = this.REQUEST_TYPE.RENEW_TOKEN;
requestInfo.stateMatch = true;
break;
}
}
}
In the new version I cant see any places where this variable is saved. So when it tries to compare the state in getRequestInfo it doesn't match.
// external api requests may have many renewtoken requests for different resource
if (!requestInfo.stateMatch && window.parent) {
requestInfo.requestType = this._requestType;
var statesInParentContext = this._renewStates;
for (var i = 0; i < statesInParentContext.length; i++) {
if (statesInParentContext[i] === requestInfo.stateResponse) {
requestInfo.stateMatch = true;
break;
}
}
}
Thanks
The text was updated successfully, but these errors were encountered: