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

@aurik/sdk

v0.0.6

Published

Official Aurik SDK

Readme

Aurik Identity SDK

The official isomorphic SDK for the Aurik Identity Platform. Integrate secure, type-safe authentication into your React or Express applications in minutes.

Features

  • PKCE Flow: Mandatory security for public applications.
  • Isomorphic: Same core logic for browser and server environments.
  • React Components: Branded Signin buttons and hooks included.
  • Express Adapters: Ready-to-use middlewares for session management.
  • Automatic Token Rotation: Seamless refresh token handling.
  • Privacy-First Signout: App-centric revocation that preserves SSO.

Installation

npm install @aurik/sdk
# or
pnpm add @aurik/sdk

⚛️ React Integration (SPAs)

1. Setup the Provider

Wrap your application with the AurikProvider.

import { AurikProvider } from '@aurik/sdk/react';

export default function App() {
  return (
    <AurikProvider 
      clientId="YOUR_CLIENT_ID" 
      redirectUri="http://localhost:3000/callback"
    >
      <YourRoutes />
    </AurikProvider>
  );
}

2. Use the Hooks

Access user state and methods from any component.

import { useAurik, SigninButton } from '@aurik/sdk/react';

function Header() {
  const { user, isAuthenticated, signout } = useAurik();

  if (isAuthenticated) {
    return (
      <div>
        <span>Welcome, {user.given_name}</span>
        <button onClick={signout}>Logout</button>
      </div>
    );
  }

  return <SigninButton theme="dark" />;
}

🛡️ Express Integration (Backend)

The Express adapter handles cookies, PKCE verifiers, and redirects automatically using httpOnly secure cookies.

1. Initialize

import { AurikExpress } from '@aurik/sdk/express';
import cookieParser from 'cookie-parser';

const app = express();
app.use(cookieParser()); // Required

const aurik = new AurikExpress({
  clientId: process.env.AURIK_CLIENT_ID,
  clientSecret: process.env.AURIK_CLIENT_SECRET, // Required for Confidential Apps
  redirectUri: 'http://localhost:3000/api/callback'
});

2. Routes

// Initiate Login
app.get('/login', aurik.redirectToSignin());

// Handle Callback (Tokens & Cookies)
// IMPORTANT: This route must match the 'redirectUri' registered in the Aurik Developer Console
app.get('/api/callback', aurik.handleCallback({
  successRedirect: '/dashboard',
  errorRedirect: '/login'
}));

// Protect Routes
app.get('/dashboard', aurik.requireAuth(), (req, res) => {
  res.json({ message: `Hello ${req.user.given_name}` });
});

// Signout (Local Revocation)
app.get('/logout', aurik.handleSignout({ redirectUri: '/' }));

🛠️ Advanced Usage (Core Server)

For non-Express environments (NestJS, Hono, Fastify), use the core AurikServer class.

import { AurikServer } from '@aurik/sdk/server';

const aurik = new AurikServer({ ... });

// Manually swap codes
const tokens = await aurik.exchangeCode(code, verifier);

// Manually fetch user profile
const user = await aurik.getUser(accessToken);

Security Policy

Aurik enforces PKCE for all public applications and recommends httpOnly cookies for server-side integrations to prevent XSS-based token theft.


© 2026 Aurik Identity Platform.