Refactor authentication code; add OIDC support

This commit is contained in:
yu-i-i
2026-07-17 17:55:08 +02:00
parent 2b78561654
commit fae9cef1e4
48 changed files with 1170 additions and 607 deletions
@@ -455,7 +455,7 @@ async function updateUserSettings(req, res, next) {
if (
newEmail == null ||
newEmail === user.email ||
(req.externalAuthenticationSystemUsed() && !user.hashedPassword)
req.externalAuthenticationSystemUsed()
) {
// end here, don't update email
SessionManager.setInSessionUser(req.session, {
@@ -542,7 +542,6 @@ async function doLogout(req) {
}
async function logout(req, res, next) {
if (req?.session.saml_extce) return res.redirect(308, '/saml/logout')
const requestedRedirect = req.body.redirect
? UrlHelper.getSafeRedirectPath(req.body.redirect)
: undefined