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

@adiom-data/framework-web

v0.0.3

Published

Small browser helpers for applications using the framework auth endpoints.

Readme

framework web

Small browser helpers for applications using the framework auth endpoints.

Installing Without A Registry

The package builds to dist and exports JavaScript plus TypeScript declarations, so consumers do not need to compile files from src.

For local development, use a file dependency:

{
  "dependencies": {
    "@adiom-data/framework-web": "file:../framework/web"
  }
}

For a pnpm project that depends on this package from the framework repo, use a git dependency with the package path:

{
  "dependencies": {
    "@adiom-data/framework-web": "git+ssh://[email protected]/adiom-data/framework.git#path:web"
  }
}

For package managers that do not support git subdirectory dependencies, create a tarball and depend on that artifact:

cd web && npm pack
{
  "dependencies": {
    "@adiom-data/framework-web": "file:../adiom-data-framework-web-0.0.3.tgz"
  }
}

Browser Auth

AuthTokenManager fetches short-lived app JWTs from /auth/token, caches them until they are close to expiration, and clears local state on unauthorized responses. clear() also invalidates pending token results. A response from an older authentication state cannot replace or clear a newer token. Forced refreshes bypass the cached token and share any pending token fetch. authStateVersion changes when authentication is cleared, allowing request retries to stay within the authentication state in which they started.

import { AuthTokenManager, createAuthInterceptor } from "@adiom-data/framework-web/auth";

const tokenManager = new AuthTokenManager({
  tokenUrl: "/auth/token",
  logoutUrl: "/auth/logout",
});

const authInterceptor = createAuthInterceptor(tokenManager);

Use the interceptor with Connect clients that should send the app bearer token. Concurrent authentication retries share a refresh. If another request already refreshed the rejected token, the interceptor reuses it. Requests are not retried across a clear() or logout.

const transport = createConnectTransport({
  baseUrl: "/api",
  interceptors: [authInterceptor],
});

The default credentials mode is same-origin, matching the recommended same-host /auth mount. For cross-origin auth hosts, pass credentials: "include" and configure CORS at the gateway or HTTP layer.

For local-only logout, call await tokenManager.logout() and handle rejection when the server cannot complete logout. Token retrieval is suspended while logout is in progress, and pending token responses are discarded. Requests to the token and logout endpoints use cache: "no-store". If /auth/logout redirects through the upstream OIDC provider, use a top-level browser navigation instead:

tokenManager.logoutWithRedirect();