diff --git a/lib/interactive-auth.js b/lib/interactive-auth.js index 7392753f0..8ba89516b 100644 --- a/lib/interactive-auth.js +++ b/lib/interactive-auth.js @@ -18,6 +18,8 @@ limitations under the License. /** @module interactive-auth */ var q = require("q"); +var utils = require("./utils"); + /** * Abstracts the logic used to drive the interactive auth process. * @@ -116,7 +118,7 @@ InteractiveAuth.prototype = { var auth = { session: this._data.session, }; - Object.assign(auth, authData); + utils.extend(auth, authData); this._doRequest(auth); }, diff --git a/lib/utils.js b/lib/utils.js index 942503d20..523cde013 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -337,6 +337,9 @@ var deepCompare = module.exports.deepCompare = function(x, y) { * * All enumerable properties, included inherited ones, are copied. * + * This is approximately equivalent to ES6's Object.assign, except + * that the latter doesn't copy inherited properties. + * * @param {Object} target The object that will receive new properties * @param {...Object} source Objects from which to copy properties *