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)
|
||||
}
|
||||
|
||||
// Decide whether we need a disconnect or a log in with button for social account logins
|
||||
if (config.twitter && config.twitter.api) {
|
||||
if (!socialStatus.enabled.twitter) {
|
||||
res.locals.twitter_auth = true
|
||||
} else if (socialStatus.source !== 'twitter') {
|
||||
res.locals.twitter_auth = false
|
||||
let et = config.external
|
||||
if (et) {
|
||||
// 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
|
||||
} else if (socialStatus.source !== 'twitter') {
|
||||
res.locals.twitter = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (config.discord && config.discord.api) {
|
||||
if (!socialStatus.enabled.discord) {
|
||||
res.locals.discord_auth = true
|
||||
} else if (socialStatus.source !== 'discord') {
|
||||
res.locals.discord_auth = false
|
||||
if (et.discord && et.discord.api) {
|
||||
if (!socialStatus.enabled.discord) {
|
||||
res.locals.discord = true
|
||||
} else if (socialStatus.source !== 'discord') {
|
||||
res.locals.discord = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (config.facebook && config.facebook.client) {
|
||||
if (!socialStatus.enabled.facebook) {
|
||||
res.locals.facebook_auth = config.facebook.client
|
||||
} else if (socialStatus.source !== 'facebook') {
|
||||
res.locals.facebook_auth = false
|
||||
if (et.facebook && et.facebook.client) {
|
||||
if (!socialStatus.enabled.facebook) {
|
||||
res.locals.facebook = et.facebook.client
|
||||
} else if (socialStatus.source !== 'facebook') {
|
||||
res.locals.facebook = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (config.google && config.google.api) {
|
||||
if (!socialStatus.enabled.google) {
|
||||
res.locals.google_auth = config.google.api
|
||||
} else if (socialStatus.source !== 'google') {
|
||||
res.locals.google_auth = false
|
||||
if (et.google && et.google.api) {
|
||||
if (!socialStatus.enabled.google) {
|
||||
res.locals.google = et.google.api
|
||||
} else if (socialStatus.source !== 'google') {
|
||||
res.locals.google = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user