You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We're currently developing a SvelteKit project using Firebase and we wanted to use Sveltefire as well because it's great for what we need.
The problem comes when we want to use the user in the backend (e.g.: +page.server.ts files) and for that we know we cannot import nor use the stores that sveltefire operates with.
What we want to do is something like using the getFirebaseContext() (or anything actually that can give us access to that) function and retrieve the informations we need (e.g.: in the load function of a page):
exportconstload=async({ locals })=>{const{ auth }=getFirebaseContext();console.log('We have the user here!',auth?.currentUser);};
How should we properly use these functions of sveltefire with SSR and sveltekit? Any feedback is appreciated :)
The text was updated successfully, but these errors were encountered:
We're currently developing a SvelteKit project using Firebase and we wanted to use Sveltefire as well because it's great for what we need.
The problem comes when we want to use the user in the backend (e.g.: +page.server.ts files) and for that we know we cannot import nor use the stores that sveltefire operates with.
What we want to do is something like using the
getFirebaseContext()
(or anything actually that can give us access to that) function and retrieve the informations we need (e.g.: in the load function of a page):How should we properly use these functions of sveltefire with SSR and sveltekit? Any feedback is appreciated :)
The text was updated successfully, but these errors were encountered: