You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's not possible to pass multiple cookies with the set-cookie header via AWS Lambda, so the normalizeOutgoingHeaders does not help with cookies in responses.
This results in issues like the following for some requests (e.g. adapted @auth0/nextjs code for SSR-compatible serverless auth), as only the first cookie is actually set:
{"url":"/api/auth/callback?code=xxx&state=yyy","statusCode":400,"statusMessage":"checks.state argument is missing","message":"checks.state argument is missing","description":""}
Note that I also changed the .join() to use ; because the cookie packages expects that format.
Apologies if this should be on nuxt/framework instead. This took me many hours to find out, and I just wanted to make sure it was documented somewhere to eventually get fixed, so that my hack is no longer required as a post-build step.
Logs
No response
The text was updated successfully, but these errors were encountered:
Environment
aws-lambda deployment setting
nitro via nuxt@3.0.0-rc3
Reproduction
See below
Describe the bug
It's not possible to pass multiple cookies with the
set-cookie
header via AWS Lambda, so thenormalizeOutgoingHeaders
does not help with cookies in responses.This results in issues like the following for some requests (e.g. adapted @auth0/nextjs code for SSR-compatible serverless auth), as only the first cookie is actually set:
Additional context
Documentation here: https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-lambda.html#http-api-develop-integrations-lambda.v2
I was able to fix the issue with this hack to the handler, which is very inelegant:
Note that I also changed the
.join()
to use;
because thecookie
packages expects that format.Apologies if this should be on
nuxt/framework
instead. This took me many hours to find out, and I just wanted to make sure it was documented somewhere to eventually get fixed, so that my hack is no longer required as a post-build step.Logs
No response
The text was updated successfully, but these errors were encountered: