From 3c3d7ebbdcbc816010c60e1a0e5cc47704288118 Mon Sep 17 00:00:00 2001 From: Sergey Khvan Date: Fri, 23 Jun 2017 22:15:33 +0500 Subject: [PATCH 1/2] array in customData issue --- lib/resource/Account.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/resource/Account.js b/lib/resource/Account.js index 961853ec..ff741ac0 100644 --- a/lib/resource/Account.js +++ b/lib/resource/Account.js @@ -650,7 +650,12 @@ Account.prototype.toOktaUser = function toOktaUser(configuration) { if (configuration.customDataStrategy === 'serialize') { oktaUser.profile.customData = JSON.stringify(value); } else { - extend(oktaUser.profile, dot.dot(value)); + extend(oktaUser.profile, Object.keys(value).reduce(function(result, key) { + if(value[key]) { + result[key] = value[key]; + } + return result; + }, {})); } break; default: From e6e0b3ea34fee08e55d0e40b1f1766f15715d375 Mon Sep 17 00:00:00 2001 From: Sergey Khvan Date: Fri, 23 Jun 2017 22:29:59 +0500 Subject: [PATCH 2/2] array in customData issue --- lib/resource/Account.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/resource/Account.js b/lib/resource/Account.js index ff741ac0..b5215e48 100644 --- a/lib/resource/Account.js +++ b/lib/resource/Account.js @@ -651,9 +651,7 @@ Account.prototype.toOktaUser = function toOktaUser(configuration) { oktaUser.profile.customData = JSON.stringify(value); } else { extend(oktaUser.profile, Object.keys(value).reduce(function(result, key) { - if(value[key]) { - result[key] = value[key]; - } + result[key] = value[key]; return result; }, {})); }