Firebase Authentication Logout Issue on Subdomain Redirection (Main Domain to Subdomain) in Next.js Project. #70607
Unanswered
thivagarradhakrishnan
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Summary
The Issue
-I'm working on a website with Firebase Authentication, and I'm encountering an issue with session management between my main domain and subdomain.
Here's the setup:
My Setup:
Main Domain: abcd.com
Subdomain: blog.abcd.com
Authentication: Firebase Authentication
Frontend: Next.js
Backend: Express with Firebase Admin SDK
The problem occurs when a user logs in on the main domain (abcd.com). After the login process, if the user clicks the "Resources" button (which redirects them to the subdomain blog.abc.com), they are automatically logged out on the subdomain. I need to maintain the session across both the main domain and subdomain.
Questions:
Why is the session cookie not being recognized on the subdomain?
How can I ensure that Firebase authentication persists across both the main domain and subdomain?
Any help would be greatly appreciated. Thank you!
Additional information
No response
Example
No response
Beta Was this translation helpful? Give feedback.
All reactions