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

@microwiseai/ist-identity-react

v0.2.0

Published

React bindings for IST identity (Firebase IdP -> ist-identity SSOT). Drop-in replacement for @ist/auth.

Downloads

14

Readme

@ist/identity-react

React bindings for the ist-identity SSOT. Drop-in replacement for @ist/auth.

Firebase is used only as an external IdP; the canonical identity is the Firebase uid adopted by ist-identity. There are no Firestore writes — all identity is persisted via the identity-api Worker.

Surface (compatible with @ist/auth)

  • AuthProvider, useAuth(), LoginButton (Mantine)
  • getFirebaseApp(), getFirebaseAuth() — parity shims
  • firebaseConfig — integrated-session project config
import { AuthProvider, useAuth, LoginButton } from '@ist/identity-react';

<AuthProvider>
  <App />
</AuthProvider>;
// Base URL defaults to the canonical identity-api; override per-build with the
// VITE_IST_API_URL env, or at runtime via the `baseUrl` prop.

useAuth() → AuthContextType

{
  user: IstUser | null;   // { uid, username, displayName?, email?, photoURL? }
  isLoggedIn: boolean;
  isLoading: boolean;
  token: string | null;          // IST JWT (HS256)
  signInWithGoogle: () => Promise<void>;
  signOut: () => Promise<void>;
  getToken: () => Promise<string>; // compat shim for old user.getIdToken()
}

uid / username / token are IST canonical identity; displayName / email / photoURL are runtime-only profile fields from the IdP (never stored server-side).

Flow (model C)

  1. signInWithGoogle: Firebase Google popup → getIdToken() → POST /api/auth/provider { provider:'firebase', idToken } → { uid, token, username }. Session cached in localStorage; runtime Firebase profile merged in-memory.
  2. mount: restore { uid, token, username } from localStorage and gate on it synchronously via a local exp decode (isLoggedIn = .token present + locally-not-expired). No network verify gates the UI — authoritative verification happens server-side at point-of-use (per auth-credential-schema). The async verifyIstToken helper stays exported for opt-in checks, not as a gate.
  3. getToken: returns the cached IST JWT, re-exchanging via the IdP near expiry.
  4. signOut: clears the local session and signs out of the IdP.
  5. authBypass (dev-only): ?authBypass=true injects a fake session for headless tests. Gated behind import.meta.env.DEV — disabled in production bundles.

Firebase is optional

The core provider is IdP-agnostic. The Firebase adapter is loaded lazily (dynamic import('./firebase.js')) only when a Firebase sign-in actually happens; inject a custom IdpAdapter via the idp prop for other IdPs or tests.

Dependencies

  • dependencies: @ist/identity
  • peerDependencies: react, react-dom, firebase (optional), @mantine/core (optional), @tabler/icons-react (optional)