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

@agenticprimitives/connect-auth

v1.0.0-alpha.9

Published

User authentication (passkey + SIWE + Google OAuth), JWT sessions, and pluggable signer interfaces.

Readme

@agenticprimitives/connect-auth

Credential ceremonies that resolve to a canonical identity — not the other way around.

Most auth SDKs make the credential the identity: lose the passkey, lose the account. connect-auth inverts that. Passkey, SIWE, and OAuth are ceremonies that prove control; the identity they resolve to is the Smart Agent address (ADR-0010). Session JWTs carry the SA address as primary subject — the credential is a signer claim only. So when a credential rotates (ADR-0011), the user signs back in as the same agent, with the same delegations, the same name, the same reputation. Identity persists; credentials rotate.

This package also defines the Signer interfaces (Signer, PasskeySigner, EOASigner, KMSSigner) that agent-account and delegation consume — the architectural contract that lets the whole stack swap signing backends without touching account or delegation code. Custodian add/remove belongs to custody, not here: this package never mutates a credential set, only resolves credential → SA.

Part of agenticprimitives — the trust substrate for the agent economy: one canonical Smart Agent identity with custody, delegation, naming, credentials, and audit evidence designed as one system.

Use This When

  • You implement passkey signup/login (WebAuthn).
  • You implement SIWE or Google OAuth sign-in.
  • You mint or verify JWT cookie sessions and CSRF tokens.
  • You need Signer interfaces for agent-account or delegation.
  • You derive CREATE2 salt from stable user scope (deriveSaltFromEmail, etc.).

Do Not Use This For

  • Smart Agent deploy, UserOps, or ERC-1271 account logic → agent-account.
  • Enrolling / rotating custodians on an SA → custody.
  • .agent names → agent-naming.
  • Public AgentCard profiles → agent-profile.
  • Delegation tokens or encrypted session rows → delegation.
  • KMS backends → key-custody (implements KMSSigner).

Install

pnpm add @agenticprimitives/connect-auth

60-Second Quickstart

import { mintSession, verifySession } from '@agenticprimitives/connect-auth';
import * as passkey from '@agenticprimitives/connect-auth/passkey';

// In your HTTP handler (app wires cookies):
const { sessionClaims } = await passkey.completeSignup(req);
const cookieValue = mintSession(sessionClaims);
// sessionClaims MUST include canonical Smart Agent address as primary subject
import { deriveSaltFromEmail } from '@agenticprimitives/connect-auth';
import { AgentAccountClient } from '@agenticprimitives/agent-account';

// Salt from user scope — NOT from .agent name.
const salt = deriveSaltFromEmail(user.email, 0);

Main Concepts

  • Credential: passkey, SIWE EOA, or OAuth identity — control facet, not the SA.
  • Canonical SA: resolved after auth (custodian lookup); JWT primary subject.
  • Signer: interface consumed by agent-account / delegation.
  • JWT session: signed cookie session (distinct from delegation SessionRow).

See docs/concepts.md.

Auth Method Subpaths (Tree-Shakable)

  • @agenticprimitives/connect-auth/passkey
  • @agenticprimitives/connect-auth/siwe
  • @agenticprimitives/connect-auth/google

How it's different from Privy, Dynamic, and Web3Auth

Hosted auth vendors give you login plus an embedded key, and the identity lives in their database — your users exist because the vendor's account table says so. Here the identity is an on-chain address that no auth provider can revoke, and this package is one composable layer over it:

  • Framework-agnostic and stateless. No hosted dashboard, no database, no cookie I/O — your app wires HTTP routes and storage; this package handles the cryptographic ceremonies and JWT mint/verify.
  • No key custody. It defines the KMSSigner interface; concrete signing backends live in key-custody. The auth layer never holds material it could lose.
  • Login is not authority. A session JWT proves who signed in. What the agent may do is the delegation layer's job — scoped, revocable, on-chain-enforceable — not a side effect of holding a session.

Security Invariants

  • JWT secrets never logged; CSRF origin exact-match.
  • WebAuthn challenges one-shot.
  • Salt derivation deterministic (keccak).

See docs/security.md and AUDIT.md.

Documentation Map

Status

Testnet/pilot-ready. Production launch is gated on the public checklist in the root README — including third-party contract audit and governance key rotation. Track every security finding live in docs/audits/findings.yaml.

Validation

pnpm check:connect-auth
pnpm check:forbidden-terms

License

UNLICENSED.