When (not) to use this package - #633
-
In If your app needs the Firebase user for SSR (but does not need the ID token server side), you could consider one of these approaches:
@kmjennison I want to use this library but since it's not yet stable with firebase v9, I have to go with the second approach you provided. However, I wanted to ask you if that was really an alternative that one would seek to. In firebase session cookies documentation, they indicated to set the client auth state to none since the session cookie is stored in a httpOnly cookie. If so, how can I access firebase SDK services such as firestore and storage from the client side if there is no auth state. What I need for my application is a consistent state on the client and the server (However, I only need the user token in SSR, and not for server side api requests). Can you ellaborate on what you mean by using firebase session cookie as an alternative to be able to access the user client side and in SSR. I know I shouldn't be asking this here, but I just wanted to know what u meant by using firebase session cookies as an alternative. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
@kevinnammour I don't see a reason the Firebase client-side auth can't be used in conjunction with Firebase session cookies. The Firebase docs might just be focusing on a cookie-only approach when they suggest not persisting auth on the client. However, I might be missing something that would cause a problem with that setup—I'm not sure. As for this package, I'm hoping to get out a stable version soon, time-permitting! There's not much left on the v1 roadmap: #265 |
Beta Was this translation helpful? Give feedback.
@kevinnammour I don't see a reason the Firebase client-side auth can't be used in conjunction with Firebase session cookies. The Firebase docs might just be focusing on a cookie-only approach when they suggest not persisting auth on the client. However, I might be missing something that would cause a problem with that setup—I'm not sure.
As for this package, I'm hoping to get out a stable version soon, time-permitting! There's not much left on the v1 roadmap: #265