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

@seek-services/auth-js

v0.2.0

Published

Browser SDK of SeekAuth: OpenID Connect logins with PKCE, DPoP-bound tokens, the embedded login, passkeys and the account API

Readme

@seek-services/auth-js

The browser core of the SeekAuth SDK: logins through the hosted page or on your own page, tokens bound to a key that never leaves the browser (DPoP), storage and refresh of the session across tabs, passkeys, and the account API. It has no runtime dependencies and works with any framework. For React, use @seek-services/auth-react, which is built on it.

npm install @seek-services/auth-js

It is an ES module with its TypeScript types, for browsers that have Web Crypto, IndexedDB and fetch (every current one). It can be imported during server rendering, but logs in only in a browser.

A login in a few lines

You need an app in the SeekAuth dashboard. Its development environment comes with a single-page app client, and its Quickstart page shows the issuer and the client id. Development accepts any page on http://localhost:<port>; in production, list your page under the client's allowed origins and redirect URIs.

import { AuthClient } from '@seek-services/auth-js'

const auth = new AuthClient({
  issuer: 'https://your-app-dev.auth.seek.services',
  clientId: 'your-app-dev-spa',
  redirectUri: window.location.origin + '/',
})

// On page load: finish a login that came back, or pick the stored session up.
let user = auth.hasRedirectResponse() ? await auth.handleRedirectCallback() : await auth.restore()
auth.subscribe((next) => {
  user = next
})

document.querySelector('#login')?.addEventListener('click', () => auth.loginWithRedirect())
document.querySelector('#logout')?.addEventListener('click', () => auth.logout())

// Calls to your API carry the access token and a fresh DPoP proof.
const orders = await auth.authFetch('https://api.your-app.com/orders', { resource: 'orders-api' })

loginWithRedirect() goes to the environment's hosted login page and back. beginLogin() runs the same login on your own page instead (the embedded login): it returns a challenge client that says what to ask for next.

What is in it

  • AuthClient: the session of a single-page app. The access token lives in memory and the refresh token in IndexedDB, both bound to the device's DPoP key; refreshes are serialized across tabs with the Web Locks API.
  • ChallengeClient: the embedded login's steps (email code, password, passkeys, wallets, two-step login, terms).
  • client.passkeys, client.twoStep, client.identities: the account API for an app's settings page.
  • PKCE, DPoP proofs, ID token checks, and the errors the service answers with (AuthError, StepUpRequiredError).

Documentation

@seek-services/auth-js and @seek-services/auth-react are released together and always carry the same version.

Licence

MIT