Skip to content

Commit 7d118ec

Browse files
committed
Use MULTI_AUTH_REGEXP to test for multi auth keys
1 parent eaa15b3 commit 7d118ec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/auth.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ async function refreshMultiAuthCookies (req, res) {
139139
// only refresh session cookie manually if we switched to anon since else it's already handled by next-auth
140140
if (key === SESSION_COOKIE && !isAnon) continue
141141

142-
if (!key.startsWith(MULTI_AUTH_LIST) && key !== SESSION_COOKIE) continue
142+
if (!MULTI_AUTH_REGEXP.test(key) && key !== SESSION_COOKIE) continue
143143

144144
if (MULTI_AUTH_JWT_REGEXP.test(key) || key === SESSION_COOKIE) {
145145
const oldToken = value

0 commit comments

Comments
 (0)