Firebase ❤️ Svelte: A SvelteKit + Typescript + Firebase library inspired by Fireship.io
MIT License
Bot releases are visible (Hide)
Published by github-actions[bot] 7 months ago
Published by github-actions[bot] 7 months ago
peerDependencies
to include Svelte 4 and Firebase 10import { loadScriptOnce } from 'sveltefirets/helpers/loader';
) then update to typescript version 5 and set moduleResolution
to bundler
in your tsconfig.json
as described in https://kit.svelte.dev/docs/packaging#typescript.authState
is set to undefined
until onAuthStateChanged()
either returns null
or a Firebase User object enabling $authState !== undefined
to be used to detect if auth has finished loadingstartWith
on Doc
and Collection
components reactivefirebaseConfig.ts
file manually and passing config to sveltefirets
in the root layout (client) and hooks (server) to just placing it in the PUBLIC_FIREBASE_CONFIG
.env variable. firebaseConfig
values are not accessed by importing from sveltefirets
as the library automatically reads the .env variables now.loadScriptOnce
and loadStylesOnce
dont mark script/style loaded until after it completesproviderIds
array instead of signInMethod
on user objectupdateUserData()
in favor of saveUserData()
which accepts entire authResult object from FirebaseUi for Web to add signInMethod
and emailVerified
fields to the base user object. Correspondingly deprecated the updateuserdata
event in favor of authresult
for FirebaseUiAuth.svelte
.continueUrl
prop to FirebaseUiAuth.svelte
to make passwordless email authentication feasible using a landing page in single-page apps that conditionally load FirebaseUiAuth
FirebaseUiAuth.svelte
component (and code optimizations)__layout.svelte
load client side and in hooks.ts
server side.