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

multipass-everywhere

v1.0.2

Published

Shopify Multipass authentication library with WebCrypto API. WinterTC compatible - works in all JavaScript runtimes (Node.js, Deno, Cloudflare Workers, browsers) using standard Web APIs.

Readme

Multipass

A secure token generation library for Shopify Multipass authentication. WinterTC compatible - works across all JavaScript runtimes including Cloudflare Workers, Deno, Node.js, and browsers.

Shopify provides a mechanism for single sign-on known as Multipass. Multipass uses an AES encrypted JSON hash to securely pass customer information to Shopify and automatically log users in. This library provides functions for generating these tokens using standard Web APIs.

Lightweight and dependency-free - uses only native Web Crypto APIs for all cryptographic operations.

Installation

npm install multipass-everywhere

Usage

import { Multipass } from "multipass-everywhere";

// Initialize with your Shopify Multipass secret
// The secret can be found in your shop Admin (Settings > Checkout > Customer Accounts)
const multipass = new Multipass("your-multipass-secret");

// Create your customer data hash
// The email and created_at fields are required
const data = {
  email: "[email protected]",
  first_name: "John",
  last_name: "Smith",
  tag_string: "vip",
  return_to: "https://your-shop.myshopify.com/products/some-product",
};

// Encode data to a token
const token = await multipass.encode(data);
console.log(token);

// Generate a full Shopify login URL
const url = await multipass.generateUrl(data, "your-shop.myshopify.com");
console.log(url);
// Generates: https://your-shop.myshopify.com/account/login/multipass/{TOKEN}

Note: The library automatically adds the required created_at timestamp field.

Requirements

To use Multipass with Shopify, an Enterprise / Plus plan is required. Make sure "Accounts are required" or "Accounts are optional" is selected and Multipass is enabled in your Shopify admin.

Supported Customer Data Fields

You can include the following fields in your customer data:

| Field | Description | | ------------ | ------------------------------------------------------------------- | | email | Required. Customer's email address | | created_at | Required. Current timestamp in ISO8601 format (added automatically) | | first_name | Customer's first name | | last_name | Customer's last name | | tag_string | Comma-separated tags to apply to the customer | | return_to | URL path within your store to redirect after login | | identifier | Optional unique identifier if emails aren't unique | | addresses | Array of customer addresses |

Note: The remote_ip field is deprecated and no longer supported by Shopify.

Token Validity

Multipass tokens are only valid for 15 minutes and can only be used once. You should always generate tokens on-the-fly when needed.

Features

  • Secure encryption using AES-CBC
  • Token signing with HMAC
  • Base64URL encoding for URL safety
  • Works in browser and Node.js environments with Web Crypto API
  • WinterTC compatible - uses standard Web APIs for cross-runtime compatibility
  • Works in serverless environments like Cloudflare Workers
  • Zero dependencies - small bundle size and fast loading
  • Lightweight implementation using only native Web APIs

Author

Vadym Rusin

License

MIT