@mierune/sveltekit-firebase-auth-ssr
TypeScript icon, indicating that this package has built-in type declarations

0.0.24 • Public • Published

@mierune/sveltekit-firebase-auth-ssr

NPM Version

[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/

Installation

npm install -D @mierune/sveltekit-firebase-auth-ssr

Usage

  1. Prerequisites:
    • Project ID of the Firebase project
    • API Key of the Firebase project
    • Firebase Service Account Key (from Google Cloud)
  2. 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)
  3. Implement sign-in and sign-out functionality in your application. (Example: TODO)
  4. Use the user information and implement database integration if needed.
  5. Ensure that the required environment variables are set in the execution environment.

Development

direnv allow
pnpm dev-in-emulator

/@mierune/sveltekit-firebase-auth-ssr/

    Package Sidebar

    Install

    npm i @mierune/sveltekit-firebase-auth-ssr

    Weekly Downloads

    12

    Version

    0.0.24

    License

    none

    Unpacked Size

    13.1 kB

    Total Files

    8

    Last publish

    Collaborators

    • mierune_iguchi
    • ciscorn