Small refactor of code flow in multiAuthMiddleware (#2455)

This commit is contained in:
ekzyis 2025-08-27 20:50:18 +02:00 committed by GitHub
parent 7fcc1b1b78
commit c5b50d71ac
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -196,11 +196,10 @@ export async function multiAuthMiddleware (req, res) {
}
const ok = await checkMultiAuthCookies(req, res)
if (!ok) {
if (ok) {
await refreshMultiAuthCookies(req, res)
} else {
await resetMultiAuthCookies(req, res)
return switchSessionCookie(req)
}
await refreshMultiAuthCookies(req, res)
return switchSessionCookie(req)
}