set-Cookie info is not returned from callback url

I’m contacting here because CORS setting does not solve the problem.
There is a problem logging in with the SNS account with the passport JS.
I have deployed Backend in Heroku and Front in Netlify.

In “dev” environment, localhost has set-cookie information in the callback url response, which allows to log in immediately.

However, in the “prod” environment ‘netlify’, there is no set-cookie information in the callback url response value. And, the response values are slightly different.
Therefore, DB, which is a session repository, can save session user information, but it is not actually log in.

How can I solve it?

  • dev (localhost)
    Response Headers
    HTTP/1.1 302 Found
    x-powered-by: Express
    Vary: Origin, Accept, Accept-Encoding
    access-control-allow-credentials: true
    strict-transport-security: max-age=10886400000; includeSubDomains
    location: /
    content-type: text/html; charset=utf-8
    content-length: 46
    set-cookie: connect.sid=s%3A6O0uFG3yVapSTKfdTWDIzhBmjrwTF0KS.BDQMiemTQ6TRBLIbufJquQ5%2FcKTLKbGqOnllkgu9vfU; Path=/; Expires=Thu, 02 Jul 2020 08:44:13 GMT; SameSite=None
    date: Thu, 02 Jul 2020 07:44:13 GMT
    connection: close

  • prod (netlify)

Hi @skyuncie, welcome to the community!

I’m not quite sure how Netlify fits in besides hosting your site. Are you using a Netlify Function? Can you provide a live example that demonstrates this issue? This will help us test and reproduce the issue so we can help figure out the issue.