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

@paralyn/identity

v0.1.4

Published

PARALYN identity — handoff tokens, session claims, platform URLs

Readme

@paralyn/identity

Secure, zero-friction identity for AI-powered products.

Drop-in token signing for the PARALYN handoff flow. Your backend proves who the user is — PARALYN handles everything else. No passwords stored, no OAuth complexity, no shared secrets in the browser.

npm license


Overview

Add secure, role-aware AI to your product without building auth from scratch.

@paralyn/identity handles the trust layer between your backend and the PARALYN Platform. Your server signs a short-lived token that proves who the user is and what they're allowed to do — PARALYN verifies it and issues a scoped session. No passwords, no OAuth flows, no shared secrets in the browser.

Used by @paralyn/sdk to authenticate the embedded widget. Also available standalone if you need to sign tokens in your own backend (Node.js, Edge, Deno).


Installation

npm install @paralyn/identity

Handoff tokens

Sign a handoff token in your backend to initiate a PARALYN login:

import { signHandoffToken, createPlatformHandoffUrl } from "@paralyn/identity";

const token = await signHandoffToken(
  process.env.PARALYN_HANDOFF_SECRET!, // shared secret from workspace registration
  {
    sub: "user-123",          // your user's stable ID
    workspace: "acme-corp",
    tenant_id: "acme-corp",
    role: "user",             // "user" | "admin" | "developer" | "owner"
    email: "[email protected]",   // optional
    name: "Jane Smith",       // optional
  },
  600, // TTL in seconds (default: 120)
);

// Build the platform login URL
const loginUrl = createPlatformHandoffUrl(
  "https://paralynhq-ai.vercel.app",
  token,
  "/dashboard", // optional redirect path after sign-in
);

// Redirect your user to loginUrl

Verify a handoff token (done by the PARALYN API — you rarely need this):

import { verifyHandoffToken } from "@paralyn/identity";

const claims = await verifyHandoffToken(secret, token);
// { sub, workspace, tenant_id, role, email?, name? }

Session tokens

Sign and verify PARALYN access and refresh JWTs (used by the API gateway):

import { signAccessToken, verifyAccessToken } from "@paralyn/identity";

// Sign
const accessToken = await signAccessToken(jwtSecret, {
  sub: "user-123",
  workspace: "acme-corp",
  tenant_id: "acme-corp",
  role: "user",
});

// Verify
const claims = await verifyAccessToken(jwtSecret, accessToken);
// { sub, workspace, tenant_id, role, scoped_actions? }

Token claims reference

HandoffClaims

| Field | Type | Required | Description | |-------|------|----------|-------------| | sub | string | ✅ | Your user's stable external ID | | workspace | string | ✅ | Workspace slug | | tenant_id | string | ✅ | Tenant identifier (usually same as workspace) | | role | "user" \| "admin" \| "developer" \| "owner" | ✅ | User's role in the workspace | | email | string | | Optional email | | name | string | | Optional display name |

ParalynSessionClaims

| Field | Type | Description | |-------|------|-------------| | sub | string | User ID | | workspace | string | Workspace slug | | tenant_id | string | Tenant ID | | role | string | Role | | scoped_actions | string[] | Optional action allowlist |


Security

  • Handoff secrets are generated once at workspace registration. Treat them like API keys — keep them server-side only.
  • Handoff tokens have a short TTL (default 2 minutes) to limit replay window.
  • All tokens use HS256 with a 256-bit secret minimum.

Related packages

| Package | Description | |---------|-------------| | @paralyn/sdk | React widget and workspace config |


License

AfriIntelligence — © PARALYN. All rights reserved.