[WIP]
A package for integrating Firebase Authentication into SvelteKit, designed specifically for Server-Side Rendering (SSR).
It works not only in Node.js but also on Cloudflare Workers/Pages (MIERUNE/firebase-auth-cloudflare-workers-x509).
Demo: https://sveltekit-firebaseauth-ssr-stripe-demo.pages.dev/
npm install -D @mierune/sveltekit-firebase-auth-ssr
- Prerequisites:
- Project ID of the Firebase project
- API Key of the Firebase project
- Firebase Service Account Key (from Google Cloud)
- Add the necessary code to the following files:
src/hooks.client.ts
(Example: TODO)src/hooks.server.ts
(Example: TODO)src/app.d.ts
(Example: TODO)src/routes/+layout.server.ts
(Example: TODO)
- Implement sign-in and sign-out functionality in your application. (Example: TODO)
- Use the user information and implement database integration if needed.
- Ensure that the required environment variables are set in the execution environment.
direnv allow
pnpm dev-in-emulator