From 0eec30a270aa394efdcf2520bc662735d5573f9d Mon Sep 17 00:00:00 2001 From: Phillip Thelen Date: Fri, 17 Dec 2021 15:26:53 +0100 Subject: [PATCH] fix error --- website/server/libs/auth/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/server/libs/auth/index.js b/website/server/libs/auth/index.js index 4d94278da9..7d7822dfd4 100644 --- a/website/server/libs/auth/index.js +++ b/website/server/libs/auth/index.js @@ -157,9 +157,9 @@ async function registerLocal (req, res, { isV3 = false }) { }; if (existingUser) { - let networks = common.constants.SUPPORTED_SOCIAL_NETWORKS; + const networks = common.constants.SUPPORTED_SOCIAL_NETWORKS; // need to insert FB here to allow users who only have FB auth to connect local auth. - networks.insert({ key: 'facebook', name: 'Facebook' }) + networks.push({ key: 'facebook', name: 'Facebook' }); const hasSocialAuth = networks.find(network => { if (existingUser.auth.hasOwnProperty(network.key)) { // eslint-disable-line no-prototype-builtins, max-len return existingUser.auth[network.key].id;