Skip to content

Commit df17bc3

Browse files
authored
Use MULTI_AUTH_REGEXP to test for multi auth keys (#2020)
1 parent 04a4092 commit df17bc3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/auth.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ async function refreshMultiAuthCookies (req, res) {
149149
// only refresh session cookie manually if we switched to anon since else it's already handled by next-auth
150150
if (key === SESSION_COOKIE && !isAnon) continue
151151

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

154154
if (MULTI_AUTH_JWT_REGEXP.test(key) || key === SESSION_COOKIE) {
155155
const oldToken = value

0 commit comments

Comments
 (0)