mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-12 13:13:45 +01:00
Refactor authentication code; add OIDC support
This commit is contained in:
@@ -1086,10 +1086,11 @@ module.exports = {
|
||||
'launchpad',
|
||||
'server-ce-scripts',
|
||||
'user-activate',
|
||||
'ldap-authentication',
|
||||
'saml-authentication',
|
||||
'symbol-palette',
|
||||
'track-changes',
|
||||
'authentication/ldap',
|
||||
'authentication/saml',
|
||||
'authentication/oidc',
|
||||
],
|
||||
viewIncludes: {},
|
||||
|
||||
@@ -1127,6 +1128,20 @@ module.exports = {
|
||||
|| imageName.split(':')[1],
|
||||
}))
|
||||
: undefined,
|
||||
|
||||
oauthProviders: {
|
||||
...(process.env.EXTERNAL_AUTH && process.env.EXTERNAL_AUTH.includes('oidc') && {
|
||||
[process.env.OVERLEAF_OIDC_PROVIDER_ID || 'oidc']: {
|
||||
name: process.env.OVERLEAF_OIDC_PROVIDER_NAME || 'OIDC Provider',
|
||||
descriptionKey: process.env.OVERLEAF_OIDC_PROVIDER_DESCRIPTION,
|
||||
descriptionOptions: { link: process.env.OVERLEAF_OIDC_PROVIDER_INFO_LINK },
|
||||
hideWhenNotLinked: process.env.OVERLEAF_OIDC_PROVIDER_HIDE_NOT_LINKED ?
|
||||
process.env.OVERLEAF_OIDC_PROVIDER_HIDE_NOT_LINKED.toLowerCase() === 'true' : undefined,
|
||||
linkPath: '/oidc/login',
|
||||
},
|
||||
}),
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
module.exports.mergeWith = function (overrides) {
|
||||
|
||||
Reference in New Issue
Block a user