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

@innerworks-me/iw-auth-sdk

v2.0.0

Published

<center> <a href="https://innerworks.me"> <img src="https://avatars.githubusercontent.com/u/132644165?s=150&v=4" alt="Innerworks" width="150" /> </a> </center>

Readme

Innerworks Web SDK

Built with TypeScript

Supports React Supports Angular Supports JavaScript

Innerworks provides market-leading device fingerprinting and VPN detection.

True device fingerprinting enables platforms to detect and block repeat fraudsters, even if they change accounts, wallets, or even their location — all without adding user friction or compromising user privacy.

Installation

NPM

npm install @innerworks-me/iw-auth-sdk

Yarn

yarn add @innerworks-me/iw-auth-sdk

Bun

bun add @innerworks-me/iw-auth-sdk

Content Security Policy (CSP)

The Innerworks SDK uses a dynamic loading mechanism to keep the core metrics collection system always up to date to ensure the most accurate results and browser compatibility.

[!NOTE]
By default, browser CSP rules are permissive. If your website does not enforce a Content Security Policy, no additional configuration is required. The Innerworks SDK uses a dynamic loading mechanism to fetch the latest SDK-Core logic from our CDN at runtime. This ensures you always have access to the most up-to-date detection capabilities without requiring manual SDK updates

Strict CSP Configuration

If your website enforces strict CSP rules, you must whitelist our CDN domain as a trusted JavaScript source. Add sdk-cdn.prod.innerworks.me to your script-src or default-src directive.

Example CSP header with script-src:

Content-Security-Policy: script-src 'self' https://sdk-cdn.prod.innerworks.me;

Example CSP header with default-src:

Content-Security-Policy: default-src 'self' https://sdk-cdn.prod.innerworks.me;

Example meta tag:

<meta http-equiv="Content-Security-Policy" content="script-src 'self' https://sdk-cdn.prod.innerworks.me;">

If you are using both directives, add the domain to script-src as it takes precedence over default-src for script loading.

Initialise the SDK

The innerworks SDK must be instantiated after page load with you project id.

React

import { InnerworksMetrics } from "@innerworks-me/iw-auth-sdk";

function InnerworksComponent() {
  const [innerworksMetrics, setInnerworksMetrics] = useState<InnerworksMetrics|null>();

  useEffect(() => {
    setInnerworksMetrics(
      new InnerworksMetrics({
        appId: 'your-project-id'
      })
    );
  }, []);
  
  return <div></div>
}

Angular

import { InnerworksMetrics } from "@innerworks-me/iw-auth-sdk";

class MyComponent implements AfterViewInit {
  innerworksMetrics: InnerworksMetrics | null = null;

  ngAfterViewInit(): void {
    this.innerworksMetrics = new InnerworksMetrics({
      appId: 'your-project-id',
    });
  }
}

IFrame integration

You can embed the Innerworks SDK without significant modifications to your codebase by simply embedding an iframe.

See docs.innerworks.me/iframe for more information.

Sending Data

Once the SDK is initialised, data must be sent at the point at which you want to analyse the user's session.

if (innerworksMetrics) {
  await innerworksMetrics.send('user-id');
}

The user-id is used to associate data with a user on your platform. This is typically a UUID that you have access to. Examples include web3 wallet addresses, and usernames.

[!WARNING] Avoid using any personal data for the user-id, including but not limited to email addresses, names, or other identifiers that can be used to identify an individual. Innerworks does not agree to process personal data entered here.

Receiving Results

Fingerprinting

For fingerprinting, you can use the requestId to retrieve the fingerprint and any additional data via an additional request.

const {
  result,
  requestId,
} = await innerworksMetrics.send('user-id');
if (result === 'success') {
  // use the requestId from your backend
}

See the API Access docs for how to use this requestId.

[!IMPORTANT] For security reasons, the fingerprint is not provided directly to the frontend in the response, and should be requested separately from the backend.

VPN Detection

VPN results are returned directly from the SDK via a JWT. For more information on how to validate the JWT, see our JWT Verification guide.

import { InnerworksResponse } from "@innerworks-me/iw-auth-sdk";
import { jwtDecode } from "jwt-decode";

const { result, detectionResult }: InnerworksResponse = await innerworksMetrics.send('user-id');
if (result === 'success') {
  const data = jwtDecode(detectionResult);
  const {
    vpnIsEnabled,
    trueGeoLocationName,
    trueGeoLocationCode,
    vpnLocationCode,
    stateUS,
  } = data.detection_result
}

Next steps

  • To access fingerprinting information, see our API Access guide
  • To validate the JWT returned from the SDK, see our JWT Verification guide