Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

firebase-login-email

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

firebase-login-email

This package is a wrapper to Firebase simple login including all dependencies with the exception of firebase it self. Authenticate your Firebase using your Firebase simple login credentials.

latest
Source
npmnpm
Version
0.4.0
Version published
Weekly downloads
17
112.5%
Maintainers
1
Weekly downloads
 
Created
Source

firebase-login-email

Release Please npm version Gitter Issues

Authenticating Users with Email & Password

Firebase makes it easy to integrate email and password authentication into your app. Firebase automatically stores your users' credentials securely (using bcrypt) and redundantly (daily off-site backups).

This separates sensitive user credentials from your application data, and lets you focus on the user interface and experience for your app. Allows your node applications to authenticate a Firebase reference using Firebase Simple Login with email and password.

Important

:heavy_exclamation_mark: Do not embet your credentials on public code!

Installation

Install via npm:

npm install firebase firebase-login-email

Example

const { initializeApp } = require('firebase/app');
require('firebase/auth');
const FirebaseLoginEmail = require('firebase-login-email');

const app = initializeApp({
  apiKey: process.env.FIREBASE_API_KEY,
  authDomain: process.env.FIREBASE_AUTH_DOMAIN,
});

new FirebaseLoginEmail(
  app,
  {
    email: process.env.FIREBASE_EMAIL,
    password: process.env.FIREBASE_PASSWORD,
  },
  (error, user) => {
    if (error) {
      console.error('Login failed:', error.message);
      return;
    }
    console.log('Logged in as:', user.uid);
  }
);

Promise-based (async/await):

const { initializeApp } = require('firebase/app');
const { FirebaseLoginEmail } = require('firebase-login-email');

const app = initializeApp({
  apiKey: process.env.FIREBASE_API_KEY,
  authDomain: process.env.FIREBASE_AUTH_DOMAIN,
});

const user = await FirebaseLoginEmail.login(app, {
  email: process.env.FIREBASE_EMAIL,
  password: process.env.FIREBASE_PASSWORD,
});
console.log('Logged in as:', user.uid);

Load credentials from a .env file (e.g. with dotenv) or set FIREBASE_API_KEY, FIREBASE_AUTH_DOMAIN, FIREBASE_EMAIL, and FIREBASE_PASSWORD in your environment before running.

Sign up (create account)

const user = await FirebaseLoginEmail.signUp(app, {
  email: process.env.FIREBASE_EMAIL,
  password: process.env.FIREBASE_PASSWORD,
});
console.log('Created user:', user.uid);

Password reset

await FirebaseLoginEmail.sendPasswordReset(app, 'user@example.com');
// User receives an email with a reset link

Auth state (react to sign-in / sign-out)

const unsubscribe = FirebaseLoginEmail.onAuthStateChanged(app, (user) => {
  if (user) console.log('Signed in:', user.uid);
  else console.log('Signed out');
});
// Later: unsubscribe() to stop listening

ID token (for your backend)

const { user, idToken } = await FirebaseLoginEmail.loginWithIdToken(app, {
  email: process.env.FIREBASE_EMAIL,
  password: process.env.FIREBASE_PASSWORD,
});
// Send idToken in Authorization header: Bearer <idToken>
// Or get token from an already signed-in user:
const token = await FirebaseLoginEmail.getIdToken(user);

Support

Please report issues to the ticket system.

Contributing

See CONTRIBUTING.md for how to contribute, run tests, and install the project locally.

Thanks to

  • A special thanks to the developers of NodeJS and Firebase.

Keywords

account

FAQs

Package last updated on 16 Mar 2026

Did you know?

Socket

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.

Install

Related posts