Use MULTI_AUTH_REGEXP to test for multi auth keys (#2020)

This commit is contained in:
ekzyis 2025-03-25 12:25:55 -05:00 committed by GitHub
parent 04a4092090
commit df17bc3b25
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -149,7 +149,7 @@ async function refreshMultiAuthCookies (req, res) {
// only refresh session cookie manually if we switched to anon since else it's already handled by next-auth
if (key === SESSION_COOKIE && !isAnon) continue
if (!key.startsWith(MULTI_AUTH_LIST) && key !== SESSION_COOKIE) continue
if (!MULTI_AUTH_REGEXP.test(key) && key !== SESSION_COOKIE) continue
if (MULTI_AUTH_JWT_REGEXP.test(key) || key === SESSION_COOKIE) {
const oldToken = value