diff --git a/src/adal.js b/src/adal.js index 5e9a074..3b460cf 100644 --- a/src/adal.js +++ b/src/adal.js @@ -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 @@ -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); @@ -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); @@ -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