slight oversight #2
This commit is contained in:
parent
004fdcacb2
commit
a8a3ae3153
@ -237,36 +237,37 @@ router.get('/user/manage', ensureLogin, wrap(async (req, res) => {
|
|||||||
|
|
||||||
let et = config.external
|
let et = config.external
|
||||||
if (et) {
|
if (et) {
|
||||||
|
res.locals.auth = {}
|
||||||
// Decide whether we need a disconnect or a log in with button for social account logins
|
// Decide whether we need a disconnect or a log in with button for social account logins
|
||||||
if (et.twitter && et.twitter.api) {
|
if (et.twitter && et.twitter.api) {
|
||||||
if (!socialStatus.enabled.twitter) {
|
if (!socialStatus.enabled.twitter) {
|
||||||
res.locals.twitter = true
|
res.locals.auth.twitter = true
|
||||||
} else if (socialStatus.source !== 'twitter') {
|
} else if (socialStatus.source !== 'twitter') {
|
||||||
res.locals.twitter = false
|
res.locals.auth.twitter = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (et.discord && et.discord.api) {
|
if (et.discord && et.discord.api) {
|
||||||
if (!socialStatus.enabled.discord) {
|
if (!socialStatus.enabled.discord) {
|
||||||
res.locals.discord = true
|
res.locals.auth.discord = true
|
||||||
} else if (socialStatus.source !== 'discord') {
|
} else if (socialStatus.source !== 'discord') {
|
||||||
res.locals.discord = false
|
res.locals.auth.discord = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (et.facebook && et.facebook.client) {
|
if (et.facebook && et.facebook.client) {
|
||||||
if (!socialStatus.enabled.facebook) {
|
if (!socialStatus.enabled.facebook) {
|
||||||
res.locals.facebook = et.facebook.client
|
res.locals.auth.facebook = et.facebook.client
|
||||||
} else if (socialStatus.source !== 'facebook') {
|
} else if (socialStatus.source !== 'facebook') {
|
||||||
res.locals.facebook = false
|
res.locals.auth.facebook = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (et.google && et.google.api) {
|
if (et.google && et.google.api) {
|
||||||
if (!socialStatus.enabled.google) {
|
if (!socialStatus.enabled.google) {
|
||||||
res.locals.google = et.google.api
|
res.locals.auth.google = et.google.api
|
||||||
} else if (socialStatus.source !== 'google') {
|
} else if (socialStatus.source !== 'google') {
|
||||||
res.locals.google = false
|
res.locals.auth.google = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user