Clerk auth 'authMiddleware' vs 'withClerkMiddleware' and setting cookies
(https://clerk.com/docs/nextjs/middleware) I'm trying to set two cookies inside authMiddleware (afterAuth) and it works for setting the first cookie, but any subsequent cookies aren't set at all.
If i try to do it using the older 'withClerkMiddleware', it works tho.
i'm doing it simply like:
const res = NextResponse.next()res.cookies.set('cookie1', 'cookie1')res.cookies.set('cookie2', 'cookie2')
const res = NextResponse.next()res.cookies.set('cookie1', 'cookie1')res.cookies.set('cookie2', 'cookie2')
is there a way to set two cookies using authMiddeware? i'm fine with using
withClerkMiddleware
withClerkMiddleware
but there's a deprecation warning What exactly happens when the method is deprecated? Will it stop working?