mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-23 17:19:37 +02:00
Re-export doLogout (was removed from exports in commit b9fb636).
This commit is contained in:
@@ -515,4 +515,5 @@ module.exports = {
|
||||
expireDeletedUsersAfterDuration: expressify(expireDeletedUsersAfterDuration),
|
||||
ensureAffiliationMiddleware: expressify(ensureAffiliationMiddleware),
|
||||
ensureAffiliation,
|
||||
doLogout,
|
||||
}
|
||||
|
||||
@@ -158,7 +158,7 @@ const OIDCAuthenticationController = {
|
||||
async passportLogout(req, res, next) {
|
||||
// TODO: instead of storing idToken in session, use refreshToken to obtain a new idToken?
|
||||
const idTokenHint = req.session.idToken
|
||||
await UserController.promises.doLogout(req)
|
||||
await UserController.doLogout(req)
|
||||
const logoutUrl = process.env.OVERLEAF_OIDC_LOGOUT_URL
|
||||
const redirectUri = Settings.siteUrl
|
||||
res.redirect(`${logoutUrl}?id_token_hint=${idTokenHint}&post_logout_redirect_uri=${encodeURIComponent(redirectUri)}`)
|
||||
|
||||
@@ -102,7 +102,7 @@ const SAMLAuthenticationController = {
|
||||
},
|
||||
async passportLogout(req, res, next) {
|
||||
passport._strategy('saml').logout(req, async (err, url) => {
|
||||
await UserController.promises.doLogout(req)
|
||||
await UserController.doLogout(req)
|
||||
if (err) return next(err)
|
||||
res.redirect(url)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user