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

@freelight/auth-client

v0.1.0

Published

Shared browser auth client for FreeLight apps (FreeLight DAO + the Freelight campaign platform). A HotStaq frontend module shipping the OIDC Authorization Code + PKCE client (oidc-client.js) and the session manager (session-manager.js: idle/expiry handlin

Downloads

16

Readme

@freelight/auth-client

Shared browser auth client for FreeLight apps (FreeLight DAO + the Freelight campaign platform). A HotStaq frontend module so both apps run the same OIDC + session code instead of vendoring near-identical copies.

Auth itself is provided by FreelightAuth (OIDC provider: /auth, /token, /session/end, JWKS). This package is only the client.

Ships

  • oidc-client.jswindow.OIDCClient — Authorization Code + PKCE login, code exchange, RP-initiated logout (with id_token_hint aud-gate), plus:
    • OIDCClient.refreshTokens(config)refresh_token grant; on success writes the jwtToken (+ rotated refreshToken) cookies and resolves true; resolves false when there's no refresh token; rejects on HTTP/network error.
    • OIDCClient.isTokenExpired(jwt) / decodeJwtPayload(jwt) — client-side exp read for the on-load session guard.
  • session-manager.jswindow.flSession — idle tracking, silent refresh before exp, the idle prompt, and the signed-out modal with a 60s countdown that auto-routes to re-auth (Close cancels to copy unsaved input).

Install (consuming app)

// package.json
"postinstall": "npx hotstaq module install @freelight/auth-client@<ver>"

Load the assets via absolute paths (shell + header), e.g.:

<script src="/hotstaq_modules/@freelight/auth-client/public/js/oidc-client.js"></script>
<script src="/hotstaq_modules/@freelight/auth-client/public/js/session-manager.js"></script>

Then window.flSession.init(config) with { authUrl, authClientId, cookiesDomain }. Per-app glue (role gate / default redirect / templates) stays in the app and calls OIDCClient + flSession.

Develop

npm test runs the node:test suite (jsdom). CI: build → test → publish (main).