From a8a3ae3153afd3a0d13d839e17e4c27b9222160e Mon Sep 17 00:00:00 2001 From: Evert Prants Date: Thu, 8 Aug 2019 15:39:42 +0300 Subject: [PATCH] slight oversight #2 --- server/routes/index.js | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/server/routes/index.js b/server/routes/index.js index b00df49..3fcba5f 100644 --- a/server/routes/index.js +++ b/server/routes/index.js @@ -237,36 +237,37 @@ router.get('/user/manage', ensureLogin, wrap(async (req, res) => { let et = config.external if (et) { + res.locals.auth = {} // Decide whether we need a disconnect or a log in with button for social account logins if (et.twitter && et.twitter.api) { if (!socialStatus.enabled.twitter) { - res.locals.twitter = true + res.locals.auth.twitter = true } else if (socialStatus.source !== 'twitter') { - res.locals.twitter = false + res.locals.auth.twitter = false } } if (et.discord && et.discord.api) { if (!socialStatus.enabled.discord) { - res.locals.discord = true + res.locals.auth.discord = true } else if (socialStatus.source !== 'discord') { - res.locals.discord = false + res.locals.auth.discord = false } } if (et.facebook && et.facebook.client) { if (!socialStatus.enabled.facebook) { - res.locals.facebook = et.facebook.client + res.locals.auth.facebook = et.facebook.client } else if (socialStatus.source !== 'facebook') { - res.locals.facebook = false + res.locals.auth.facebook = false } } if (et.google && et.google.api) { if (!socialStatus.enabled.google) { - res.locals.google = et.google.api + res.locals.auth.google = et.google.api } else if (socialStatus.source !== 'google') { - res.locals.google = false + res.locals.auth.google = false } } }