
Company News
Socket Partners with Replit to Block Malicious Packages in AI-Powered Development
Replit is integrating Socket Firewall into its AI-powered development experience to help protect builders from malicious open source packages.
firebase-login-custom
Advanced tools
This package is a wrapper to firebase custom login including all dependencies with the exception of firebase itself.
To authenticate a user using Custom Login, we must provide each client with a secure JWT that has been generated on a server. We provide several helper libraries for generating JWTs.
Deprecation notice: The token-based flow using a Firebase Secret (Security tab in the Firebase Dashboard) is deprecated. Firebase recommends using Service Accounts and the Firebase Admin SDK to create custom tokens. This package still supports the legacy
secretoption for existing setups.
Use a Firebase Secret to generate these tokens (legacy). Firebase Secrets can be found by logging into the Firebase account and clicking on the Security tab in the Firebase Dashboard.
Security: Never commit your Firebase secret or put it in frontend code. Load it from environment variables or a secure config (e.g. process.env.FIREBASE_SECRET) on the server only.
This package is a wrapper to Firebase custom login including all dependencies with the exception of firebase itself.
More information can be found in the Firebase custom login documentation.
Install via npm or pnpm:
npm install firebase firebase-login-custom
pnpm add firebase firebase-login-custom
var ref = new Firebase('https://<Your Firebase>.firebaseio.com');
FirebaseLoginCustom(firebaseRef, {
uid: <Your id>
},
{
secret: <Your secret>,
},
function (error, data) {
if (error !== null) {
console.log(error);
} else {
console.log(data.token);
}
}
);
For async/await code, use firebaseLoginCustomAsync (same options and behaviour, returns a Promise):
const { firebaseLoginCustomAsync } = require('firebase-login-custom');
const { authData } = await firebaseLoginCustomAsync(firebaseRef, { uid: 'user-1' }, { secret: process.env.FIREBASE_SECRET });
ref, data, option, or callback): the constructor throws FirebaseLoginCustomValidationError (or the callable form throws it). With firebaseLoginCustomAsync, the Promise rejects. You can check error.code === 'FIREBASE_LOGIN_CUSTOM_VALIDATION_ERROR' or error instanceof FirebaseLoginCustomValidationError.FirebaseLoginCustomTokenError (once, asynchronously). With firebaseLoginCustomAsync, the Promise rejects with the same error. It has a cause property with the original thrown value.INVALID_EMAIL, INVALID_PASSWORD, INVALID_USER) or a generic message including the original error for other failures. With firebaseLoginCustomAsync, the Promise rejects with that string.Please report issues to ticket system. Pull requests are welcome here! See CONTRIBUTING.md for how to contribute (install locally, test, and releasing).
FAQs
This package is a wrapper to firebase custom login including all dependencies with the exception of firebase itself.
The npm package firebase-login-custom receives a total of 13 weekly downloads. As such, firebase-login-custom popularity was classified as not popular.
We found that firebase-login-custom demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Replit is integrating Socket Firewall into its AI-powered development experience to help protect builders from malicious open source packages.

Security News
npm confirmed a tooling bug incorrectly marked several one-character packages as security holders and said it was working on a rollback.

Research
/Security News
Newer packages in this compromise use native extensions and .pth loaders to execute JavaScript stealers in developer environments.