From bc13ec530df61dc8934db38e15352b86d40c6022 Mon Sep 17 00:00:00 2001 From: jdme Date: Thu, 13 Jun 2019 23:32:02 +0400 Subject: [PATCH] Fix uid issue with vk API above 5.0 --- lib/vk_server.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/vk_server.js b/lib/vk_server.js index 9479237..6aa92af 100644 --- a/lib/vk_server.js +++ b/lib/vk_server.js @@ -11,16 +11,13 @@ Oauth.registerService('vk', 2, null, function(query) { expiresAt: (+new Date) + (1000 * response.expiresIn) }; - var whitelisted = ['uid', 'nickname', 'first_name', 'last_name', 'sex', 'bdate', 'timezone', 'photo', 'photo_big', 'city', 'country']; + var whitelisted = ['id', 'nickname', 'first_name', 'last_name', 'sex', 'bdate', 'timezone', 'photo', 'photo_big', 'city', 'country']; var fields = _.pick(identity, whitelisted); _.extend(serviceData, fields); if (response.email) serviceData.email = response.email; - serviceData.id = serviceData.uid; - delete serviceData.uid; - return { serviceData: serviceData, options: {