sjcobb2022 / multipassify-ts

A modern, typed, version of the multipassify library for authenticating with Shopify using multipass.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Multipassify

// define or import multipass token from .env
const SHOPIFY_MULTIPASS_TOKEN = '6fee2f4f64e3c4b35610786df324fdbc';
 
const customerData = {
  email: 'test@example.com',
  remote_ip: 'USERS IP ADDRESS',
  return_to: 'http://some.url'
};

const multipassify = new Multipassify(SHOPIFY_MULTIPASS_TOKEN);

const token = multipassify.encode(customerData)

const url = multipassify.getUrl(customerData, 'yourstore.myshopify.com')

Install

npm i multipassify-ts

Typescript bindings for using Shopify's multipass authentication system.

Basic test suite included.

Follow the the instructions here to obtain multipass access. Please note that you need ShopifyPlus to access this feature.

About

A modern, typed, version of the multipassify library for authenticating with Shopify using multipass.

License:MIT License


Languages

Language:TypeScript 47.2%Language:JavaScript 47.1%Language:Shell 5.7%