npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@333eco/firebase-bridge

v0.1.1

Published

Accept "Log in with HeartBank" in a Firebase app: verify a login.333.eco ID token and mint YOUR project's Firebase custom token, with how the person logged in (passkey, email or SMS code) copied into claims your rules can require. ES256 only; refuses wron

Readme

@333eco/firebase-bridge

Accept Log in with HeartBank® in a Firebase app. Only Firebase apps need this package. Any other app uses an OpenID library directly: developer docs and tested samples.

Your app sends the person to login.333.eco (OpenID Connect), gets an ID token back, and gives it to a function you run. The bridge verifies the token and mints a custom token for your Firebase project, with your service account. HeartBank never holds your keys.

import { getAuth } from "firebase-admin/auth";
import { createBridge } from "@333eco/firebase-bridge";

const bridge = createBridge({
  issuer: "https://login.333.eco",
  clientId: "<your client id>",
  auth: getAuth(),
  requirePasskey: false,          // true refuses email- and SMS-code log-ins
});

// in your HTTPS function, with the nonce YOUR session issued (and then discards):
const { customToken, passkey } = await bridge.exchange(idToken, { nonce });
// the client calls signInWithCustomToken(auth, customToken)

What it refuses (each one is a test that is broken on purpose to prove it): tokens signed by a key the issuer did not publish · tampered tokens · alg: none, HMAC and RSA tokens (ES256 only) · tokens for another app (aud) or another issuer (iss) · expired tokens · a nonce from another session · several audiences without azp = you · log-ins older than maxAgeSeconds · subjects too long for a Firebase uid (refused, never truncated).

What your rules get: the custom token carries hb_amr (how the person logged in), hb_passkey (true for a passkey), and hb_acr when present. Require a passkey where it matters:

allow write: if request.auth.token.hb_passkey == true;

The Firebase uid is hb:<subject>. The subject is pairwise: unique to your app, so two apps can never link a person through it.

⚠️ The bridge holds no state. A nonce is single-use only if your session discards it after one exchange.

⚠️ With single sign-on, auth_time is the person's FIRST log-in, so a maxAgeSeconds here can refuse a normal returning user. If you need a recent log-in, send max_age in the request, so login asks them again.

⚠️ hb_passkey says how THIS log-in happened. A person can link email, phone and passkeys into one account, so the same uid can arrive with hb_passkey true or false. Check it on each token, never store it on the user. If someone joins two accounts, the joined account's uid stops arriving and they reach you under the other one.

CC0-1.0. Status: 0.x, live at login.333.eco; the API may change before 1.0.