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

authcore-sdk

v0.2.1

Published

AuthCore JavaScript SDK — token storage, silent refresh, auth state events. Works in browsers, React Native, and Node.js.

Readme

AuthCore SDK

JavaScript SDK for AuthCore — self-hosted authentication.

Install

npm install authcore-sdk

Quick Start

import AuthCore from 'authcore-sdk';

const auth = new AuthCore({
  url: 'https://auth.yourdomain.com',
  projectKey: 'proj_xxxxxxxxxxxxxxxx',
  persist: true, // optional — survive page reloads
});

// Email OTP
await auth.sendOtp({ email: '[email protected]' });
const { user } = await auth.verifyOtp({ email: '[email protected]', code: '123456' });

// Phone OTP
await auth.sendOtp({ phone: '+2348012345678' });
const { user } = await auth.verifyOtp({ phone: '+2348012345678', code: '123456' });

// Password login
await auth.signIn({ email: '[email protected]', password: 's3cur3' });

// Listen for auth state changes
auth.onAuthStateChange((event, session) => {
  if (event === 'SIGNED_IN') console.log('Signed in:', session?.user);
  if (event === 'SIGNED_OUT') console.log('Signed out');
});

// Authenticated API calls
const res = await auth.fetch('https://api.yourapp.com/me');

// Sign out
await auth.signOut();

Security

  • Token storage: When persist: true, tokens are stored in sessionStorage (cleared on tab close). For sensitive applications, implement custom storage or use memory-only mode (persist: false).
  • Transport: All API calls use HTTPS POST — tokens never appear in URLs.
  • Refresh: Refresh tokens are rotated on every use. Reuse of an old token revokes the entire session family.
  • No dependencies: Zero runtime dependencies — zero supply-chain risk.

Platforms

Works in browsers, React Native, and Node.js (ESM). TypeScript types included.

License

MIT