firebase-functions icon indicating copy to clipboard operation
firebase-functions copied to clipboard

Firebase function with express-session returning undefined value

Open kencanak opened this issue 3 years ago • 1 comments

Related issues

N/A

[REQUIRED] Version info

Firebase function: v3.21.1

node: v14.19.0

firebase-functions: v3.21.1

firebase-tools: v10.7.2

firebase-admin: v10.1.0

[REQUIRED] Test case

  • create http cloud function that's running on express
  • use express-session
  • init a firebase hosting, write a rewrite rules to run the dynamic hosting
  • session data is accessible when accessing the app via function url directly
  • session data is undefined when accessing the app via hosting url

[REQUIRED] Steps to reproduce

sample cloud function

sample rewrites rules:

"rewrites": [
        {
          "source": "/",
          "function": "sample-app"
        }
      ]

[REQUIRED] Expected behavior

session data should be accessible when accessing app via hosting url

session data was undefined

[REQUIRED] Actual behavior

Were you able to successfully deploy your functions?

yes

kencanak avatar May 12 '22 17:05 kencanak

I found a few problems with this issue:

  • I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
  • This issue does not have all the information required by the template. Looks like you forgot to fill out some sections. Please update the issue with more information.

google-oss-bot avatar May 12 '22 17:05 google-oss-bot