RW 8 - Set-Cookies header missing on prod on /auth response dbAuth

Hello! I upgrade from 7.7.4 to 8.0 and I got an error on dbAuth
I try to understand why I’can’t get the set cookie header from the /auth request on prod.

My config on /api/src/functions/auth

cookie: {
attributes: {
HttpOnly: true,
Path: ‘/’,
SameSite: ‘Strict’,
Secure: process.env.NODE_ENV !== ‘development’,
},
name: cookieName,
},

my cookieName is setted on and Environement variable.

I think it’s on redwood-v8 upgrade guide an other dude had the same problem and he detailed it very well:

So if any one have an idea I’ll take it!
Right now I just downgrade to 7.7.4

Hi @Tonidias,

Seems to be the same issue for me on Vercel with a fresh V8 install…

Please let me know if you find any workaround or fix.
I’ll do the same.

Yeah totally, on my side I downgrade to 7.7.4 just to fix it rapidly but for now no solution find :smiling_face_with_tear: if you find something I’ll appreciate if you ping me :pray:

Hi @vince and @Tonidias. Really appreciate you trying to figure this out!
Just wanted to let you know the core team is aware of the issue. We’re just a little short staffed at the moment, but will jump in and try to debug as soon as we can. Any extra clues you can find in the meantime is super helpful :slight_smile:

2 Likes

Just to follow up @vince and @Tonidias - I am clarifying a few aspects of Vercel’s cookie handling to determine if the auth issue you are seeing is related to cookie headers (and how vercel may handle them differently that AWS, Netlify and other deployment hosting platforms). We don’t see this issue on Netlify, btw.

We can reproduce the issue on a Vercel deployment which is not seen locally.

I’ll keep updating here as I learn more.

Appreciate your understanding and patience as we track this down.

2 Likes

PR with fix here: fix(dbAuth): Don't use Multi Value Headers on Vercel by Tobbe · Pull Request #11718 · redwoodjs/redwood · GitHub

I’ve tried on Vercel, and it works for me :slight_smile: As soon as the PR is merged there’ll be a Canary build for you all to try.

2 Likes

We just released Redwood v8.4.1 that includes the fix. So upgrade to the latest patch version of Redwood and dbAuth should finally work on Vercel again.

Thanks for finding and reporting the issue :pray: