Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/adal.js
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ var AuthenticationContext = (function () {
this._saveItem(this.CONSTANTS.STORAGE.NONCE_IDTOKEN, this._idTokenNonce, true);
this._saveItem(this.CONSTANTS.STORAGE.ERROR, '');
this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION, '');
var urlNavigate = this._getNavigateUrl('id_token', null) + '&nonce=' + encodeURIComponent(this._idTokenNonce);
var urlNavigate = this._getNavigateUrl('id_token', this.config.endpoints.api) + '&nonce=' + encodeURIComponent(this._idTokenNonce);

if (this.config.displayCall) {
// User defined way of handling the navigation
Expand Down Expand Up @@ -508,6 +508,8 @@ var AuthenticationContext = (function () {
var urlNavigate = this._urlRemoveQueryStringParameter(this._getNavigateUrl(responseType, resource), 'prompt');

if (responseType === this.RESPONSE_TYPE.ID_TOKEN_TOKEN) {
this.verbose('ID TOKEN TOKEN');
this.verbose('Response Type : ' + responseType);
this._idTokenNonce = this._guid();
this._saveItem(this.CONSTANTS.STORAGE.NONCE_IDTOKEN, this._idTokenNonce, true);
urlNavigate += '&nonce=' + encodeURIComponent(this._idTokenNonce);
Expand Down Expand Up @@ -585,6 +587,7 @@ var AuthenticationContext = (function () {
*/
AuthenticationContext.prototype._loadFrameTimeout = function (urlNavigation, frameName, resource) {
//set iframe session to pending
this.verbose(urlNavigation);
this.verbose('Set loading state to pending for: ' + resource);
this._saveItem(this.CONSTANTS.STORAGE.RENEW_STATUS + resource, this.CONSTANTS.TOKEN_RENEW_STATUS_IN_PROGRESS);
this._loadFrame(urlNavigation, frameName);
Expand Down Expand Up @@ -666,6 +669,9 @@ var AuthenticationContext = (function () {
this.registerCallback(this._activeRenewals[resource], resource, callback);
}
else {
this.verbose('INFORMATION');
this.verbose(JSON.stringify(this._user));
this.verbose(resource);
this._requestType = this.REQUEST_TYPE.RENEW_TOKEN;
if (resource === this.config.clientId) {
// App uses idtoken to send to api endpoints
Expand Down