Refactor authentication code; add OIDC support

This commit is contained in:
yu-i-i
2026-09-18 23:02:41 +02:00
parent 54440bdb58
commit f3d4a51e79
48 changed files with 1170 additions and 607 deletions
+17 -2
View File
@@ -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) {