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

@acl-identity/browser

v0.1.6

Published

Browser client for ACL Identity — OAuth2 PKCE, WebAuthn, account management

Readme

@acl-identity/browser

Browser client for the ACL Identity SDK. Handles OAuth2 PKCE sign-in/sign-out, WebAuthn passkey authentication, silent token renewal, and user account management.

If you are using React, install @acl-identity/react instead — it includes this package and adds AuthProvider, useAuth, and ready-made UI components.

Installation

npm install @acl-identity/browser
# or
pnpm add @acl-identity/browser

Quick start

import { ACLBrowserClient } from '@acl-identity/browser';

const client = new ACLBrowserClient({
  baseUrl: 'https://auth.example.com',
  clientId: 'my-client-id',
  redirectUri: 'https://app.example.com/callback',
  orgSlug: 'my-org',       // optional, for multi-tenant routing
  autoRefresh: true,        // auto-refresh tokens before expiry
});

Sign in (OAuth2 PKCE)

// 1. Build the authorization URL and redirect the user
const { url, state, codeVerifier } = await client.auth.buildAuthorizationUrl({
  clientId: 'my-client-id',
  redirectUri: 'https://app.example.com/callback',
  scope: 'openid profile email',
});
// store { state, codeVerifier } in sessionStorage, then:
window.location.href = url;

// 2. On the callback page, exchange the code for tokens
await client.auth.exchangeCode(code, codeVerifier, redirectUri);

// 3. Read the current user
const user = await client.auth.parseCurrentUser();
console.log(user?.email);

Sign out

await client.auth.logout({ revokeToken: true });

WebAuthn passkeys

// Authenticate with a passkey (no password)
const tokens = await client.auth.authenticateWithPasskey();

Account management

// User profile
const profile = await client.account.profile.get();
await client.account.profile.update({ displayName: 'Ada Lovelace' });

// Active sessions
const sessions = await client.account.sessions.list();
await client.account.sessions.revoke(sessionId);

// Passkeys
const passkeys = await client.account.passkeys.list();
await client.account.passkeys.delete(credentialId);

// MFA
const status = await client.account.mfa.getStatus();
const setup = await client.account.mfa.setup();
await client.account.mfa.verifySetup('123456');

Configuration

| Option | Type | Description | |---|---|---| | baseUrl | string | Base URL of your ACL Identity server | | clientId | string | OAuth2 client ID | | redirectUri | string | Registered redirect URI | | orgSlug | string | Organization slug for multi-tenant routing | | tokenStorage | TokenStorage | Custom token storage (defaults to localStorage) | | autoRefresh | boolean | Auto-refresh tokens before expiry | | clockSkewMs | number | Clock skew tolerance in milliseconds | | timeout | number | HTTP request timeout in milliseconds | | onTokenExpired | () => void | Called when the session cannot be renewed | | fetchImpl | typeof fetch | Custom fetch implementation (useful for testing) |

License

MIT