slight oversight
This commit is contained in:
parent
a7289af257
commit
004fdcacb2
@ -235,36 +235,39 @@ router.get('/user/manage', ensureLogin, wrap(async (req, res) => {
|
||||
totpEnabled = await API.User.Login.totpTokenRequired(req.session.user)
|
||||
}
|
||||
|
||||
let et = config.external
|
||||
if (et) {
|
||||
// Decide whether we need a disconnect or a log in with button for social account logins
|
||||
if (config.twitter && config.twitter.api) {
|
||||
if (et.twitter && et.twitter.api) {
|
||||
if (!socialStatus.enabled.twitter) {
|
||||
res.locals.twitter_auth = true
|
||||
res.locals.twitter = true
|
||||
} else if (socialStatus.source !== 'twitter') {
|
||||
res.locals.twitter_auth = false
|
||||
res.locals.twitter = false
|
||||
}
|
||||
}
|
||||
|
||||
if (config.discord && config.discord.api) {
|
||||
if (et.discord && et.discord.api) {
|
||||
if (!socialStatus.enabled.discord) {
|
||||
res.locals.discord_auth = true
|
||||
res.locals.discord = true
|
||||
} else if (socialStatus.source !== 'discord') {
|
||||
res.locals.discord_auth = false
|
||||
res.locals.discord = false
|
||||
}
|
||||
}
|
||||
|
||||
if (config.facebook && config.facebook.client) {
|
||||
if (et.facebook && et.facebook.client) {
|
||||
if (!socialStatus.enabled.facebook) {
|
||||
res.locals.facebook_auth = config.facebook.client
|
||||
res.locals.facebook = et.facebook.client
|
||||
} else if (socialStatus.source !== 'facebook') {
|
||||
res.locals.facebook_auth = false
|
||||
res.locals.facebook = false
|
||||
}
|
||||
}
|
||||
|
||||
if (config.google && config.google.api) {
|
||||
if (et.google && et.google.api) {
|
||||
if (!socialStatus.enabled.google) {
|
||||
res.locals.google_auth = config.google.api
|
||||
res.locals.google = et.google.api
|
||||
} else if (socialStatus.source !== 'google') {
|
||||
res.locals.google_auth = false
|
||||
res.locals.google = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user