I'm currently writing playwright tests for my application. When trying to set up the authentification for the tests I get following error for the tests, when I route through the application I get nothing, all works fine for me there:
[auth][details]: {}
[auth][error] JWTSessionError: Read more at https://errors.authjs.dev#jwtsessionerror
[auth][cause]: JWEDecryptionFailed: decryption operation failed
at gcmDecrypt (webpack-internal:///(rsc)/./node_modules/jose/dist/node/esm/runtime/decrypt.js:81:15)
at decrypt (webpack-internal:///(rsc)/./node_modules/jose/dist/node/esm/runtime/decrypt.js:104:20)
at flattenedDecrypt (webpack-internal:///(rsc)/./node_modules/jose/dist/node/esm/jwe/flattened/decrypt.js:139:90)
at async compactDecrypt (webpack-internal:///(rsc)/./node_modules/jose/dist/node/esm/jwe/compact/decrypt.js:22:23)
at async jwtDecrypt (webpack-internal:///(rsc)/./node_modules/jose/dist/node/esm/jwt/decrypt.js:12:23)
at async Object.decode (webpack-internal:///(rsc)/./node_modules/next-auth/node_modules/@auth/core/jwt.js:68:25)
at async Module.session (webpack-internal:///(rsc)/./node_modules/next-auth/node_modules/@auth/core/lib/actions/session.js:23:29)
at async AuthInternal (webpack-internal:///(rsc)/./node_modules/next-auth/node_modules/@auth/core/lib/index.js:50:24)
at async Auth (webpack-internal:///(rsc)/./node_modules/next-auth/node_modules/@auth/core/index.js:123:29)
at async AuthInfo (webpack-internal:///(rsc)/./src/app/auth-info/page.tsx:11:21)
In layout.tsx there only ``{children}` And my middleware looks like this
import { auth } from "auth";
export default auth;
export const config = { matcher: ["/recipe/create", "/recipe/:id/edit"] };