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

@identia/auth-core

v2.0.10

Published

Framework-agnostic auth engine for Identia — OIDC, PKCE, token management, passkeys

Readme

@identia/auth-core

Framework-agnostic authentication engine for the Identia CIAM platform. Handles OIDC/PKCE flows, token lifecycle, passkey (WebAuthn) ceremonies, and multi-provider login — all without tying you to React or any other UI framework.

Installation

npm install @identia/auth-core

Quick Start

import { AuthClient } from '@identia/auth-core';

const auth = new AuthClient({
  domain: 'your-tenant.accessiq.app',
  clientId: 'your-client-id',
  redirectUri: window.location.origin + '/callback',
});

// Start login
await auth.login();

// Handle callback (after redirect back)
await auth.handleCallback();

// Get current user
const user = auth.getUser();

Features

| Feature | Description | |---------|-------------| | OIDC + PKCE | Standards-compliant authorization code flow with PKCE | | Token Management | Automatic refresh, expiry detection, and secure storage | | Passkeys / WebAuthn | Registration, login, and key management for passwordless auth | | Multi-Provider | Fetch available login options (email, Google, Microsoft, GitHub, SAML) per tenant | | OAuth Flows | Initiate and complete OAuth with any configured identity provider | | Storage Strategies | localStorage, sessionStorage, or in-memory — configurable per environment | | Event System | Subscribe to auth state changes (login, logout, token_refreshed, error) |

API Reference

AuthClient

The main entry point. Manages the full authentication lifecycle.

const auth = new AuthClient({
  domain: 'tenant.accessiq.app',
  clientId: 'client-id',
  redirectUri: 'https://app.example.com/callback',
  scopes: ['openid', 'profile', 'email'],   // optional, defaults to openid profile email
  storage: 'localStorage',                   // 'localStorage' | 'sessionStorage' | 'memory'
});

await auth.login();                     // Redirect to Identia login
await auth.login({ provider: 'google' }); // Skip login page, go straight to Google
await auth.handleCallback();            // Exchange auth code for tokens
await auth.logout();                    // Clear tokens and redirect to logout endpoint
const user = auth.getUser();            // Current user profile or null
const token = auth.getAccessToken();    // Raw access token string
const isAuth = auth.isAuthenticated();  // boolean

Login Options

Discover which login methods are enabled for a tenant:

import { fetchLoginOptions } from '@identia/auth-core';

const options = await fetchLoginOptions('tenant.accessiq.app');
// { email: true, google: true, microsoft: false, github: true, saml: false, passkeys: { enabled: true } }

Passkeys

import { handlePasskeyRegistration, handlePasskeyLogin, fetchPasskeys } from '@identia/auth-core';

// Register a new passkey
await handlePasskeyRegistration({ domain: 'tenant.accessiq.app', accessToken });

// Login with passkey
const result = await handlePasskeyLogin({ domain: 'tenant.accessiq.app', tenantId });

// List registered passkeys
const keys = await fetchPasskeys({ domain: 'tenant.accessiq.app', accessToken });

JWT Utilities

import { decodeJwtPayload, isTokenExpired, extractUserProfile } from '@identia/auth-core';

const payload = decodeJwtPayload(accessToken);
const expired = isTokenExpired(accessToken);
const profile = extractUserProfile(accessToken);

Events

auth.on('login', (user) => console.log('Logged in:', user));
auth.on('logout', () => console.log('Logged out'));
auth.on('token_refreshed', (tokens) => { /* ... */ });
auth.on('error', (err) => console.error(err));

Related Packages

| Package | Description | |---------|-------------| | @identia/auth-react | React components and hooks built on auth-core | | @identia/sdk | TypeScript SDK for permissions, feature flags, and entitlements | | @identia/react | React bindings for the SDK (feature flags, permissions, guards) |

License

MIT