Unable to set cookies in hooks

I'm not able to set normal or signed cookies in hooks.

    hooks: {
        before: createAuthMiddleware(async (ctx) => {
            ctx.setCookies(
                'cookie-name',
                'test'
            )
        }),

ctx.setCookies return # SERVER_ERROR: TypeError: ctx.setCookies is not a function
When i set a signed one, there is no error, but no cookie is actually set., but i do get an error that ctx.getSignedCookies is not a function when trying to read the signed cookie.
Was this page helpful?