Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NextJS 14 + Framework hosting: __session cookie not set when deployed #6893

Open
vojdan opened this issue Mar 20, 2024 · 0 comments
Open

NextJS 14 + Framework hosting: __session cookie not set when deployed #6893

vojdan opened this issue Mar 20, 2024 · 0 comments

Comments

@vojdan
Copy link

vojdan commented Mar 20, 2024

[REQUIRED] Environment info

firebase-tools: 13.5.1

Platform: macOS

[REQUIRED] Test case

"firebase": "^10.9.0",
"firebase-admin": "^12.0.0",
"next": "14.1.2",

Logging with link auth working locally and deployed, but the __session cookie is not set when the application is deployed. When running locally the cookie gets set.

Sample network requests when running locally shows the __session cookie being set automatically after login
Screenshot 2024-03-19 at 11 06 21 PM

Screenshot 2024-03-19 at 11 06 39 PM Screenshot 2024-03-19 at 11 06 53 PM

When running the same code on Firebase Hosting no __session cookie is set
Screenshot 2024-03-19 at 11 12 03 PM

[REQUIRED] Steps to reproduce

Deploy to Firebase Hosting.
Login with link.
Inspect network requets.
Refresh.

[REQUIRED] Expected behavior

The user should be set by SSR. The session should be available in the __session cookie.

[REQUIRED] Actual behavior

When deployed to firebase Hosting, the user is not set in SSR due to the __session cookie not being set. The user state is signed out on page load and the page updates after connecting to Firebase to show the user info.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants