-
Notifications
You must be signed in to change notification settings - Fork 136
Open
Description
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):
export const load = 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 :)
gustavomorinaga
Metadata
Metadata
Assignees
Labels
No labels