From 9114f556679569f3b77639e441e79306cfe6e6b9 Mon Sep 17 00:00:00 2001 From: Abhishek Singh Date: Thu, 16 Aug 2018 18:34:31 +0530 Subject: [PATCH] Update strategy.js --- lib/passport-intercom/strategy.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/passport-intercom/strategy.js b/lib/passport-intercom/strategy.js index 7279e16..049e25e 100644 --- a/lib/passport-intercom/strategy.js +++ b/lib/passport-intercom/strategy.js @@ -94,6 +94,7 @@ Strategy.prototype.userProfile = function(accessToken, done) { var profile = { provider: 'intercom' }; profile.id = json.id; + (json.app && json.app.id_code)?profile.workspace_id = json.app.id_code: ''; profile.displayName = json.name; profile.emails = [{ value: json.email, type: "default" }]; profile.photos = [json.avatar.image_url];