Firebase Auth Lite (Beta) is a lightweight, performance-focused alternative to the official Firebase Auth SDK, designed specifically for modern browser environments. Currently at version 0.8.9, it aims to deliver significantly smaller bundle sizes and faster authentication performance, claiming to be up to 27 times smaller and 13 times faster than the official SDK. The library is under active development, with its API explicitly stated as subject to change without warning until it reaches a stable 1.0 release. Key differentiators include a simplified API, enhanced client-side security through direct OAuth redirect handling, and limitations such as localStorage-only session persistence. It relies on modern browser features like the Fetch API and localStorage, requiring users to handle transpilation for broader browser compatibility. Its release cadence is ad-hoc, driven by development progress toward v1.0.
npm install firebase-auth-liteVerified import paths — ran on the pinned version, not inferred.
Demonstrates core authentication flows including user registration (sign-up), logging in (sign-in), retrieving the current user's session, and logging out (sign-out), showcasing typical API usage.
Refer to the Firebase Auth error code documentation or the `firebase-auth-lite` wiki (github.com/samuelgozi/firebase-auth-lite/wiki/Error-codes-map) to map error codes to displayable messages for your users.
Remove any `supportedProviders` options from your `Auth` instantiation. The library will now automatically handle provider support via server responses.
Be prepared for frequent API changes and review release notes for each update. Pinning to a specific patch version is recommended in production environments.
Integrate Babel or another transpiler into your build process to target older browsers or environments that do not fully support modern JS features used by this library.
Be aware of this limitation if your application requires alternative session persistence mechanisms (e.g., cookies, sessionStorage). Plan accordingly for your security and UX requirements.
In your OAuth provider's console (e.g., Google Cloud Console), configure the redirect URI to point to the specific page in your application that will handle the login redirect.
Implement a mapping logic in your application to translate Firebase error codes (e.g., 'auth/invalid-email') into user-friendly messages. Refer to the Firebase Auth error code documentation or the library's wiki for a comprehensive list.
Ensure you are importing `Auth` as the default export using `import Auth from 'firebase-auth-lite';` and instantiating it with `new Auth(...)`.
This library is browser-focused. Ensure it runs in a modern browser environment or use appropriate polyfills for `fetch` and `localStorage` if targeting older environments.
In the respective OAuth provider's developer console, update the Authorized Redirect URIs to specify the exact URL of the page within *your application* that handles the sign-in redirect, not the `https://[app-id].firebaseapp.com/__/auth/handler` URL.
No dependency data recorded yet.