1.0.0 • Published 8 months ago

ts-multipass v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

ts-multipass

Shopify Multipass module for TypeScript.

Install

npm install ts-multipass

Example

import {Multipass, CustomerDataEssentials} from 'ts-multipass';

interface CustomerData extends CustomerDataEssentials {
  return_to: string;
  remote_ip: string;
  identifier: string;
}

const multipass = new Multipass<CustomerData>('YOUR_SECRET');

const token = multipass.generateToken({
  email: 'foo@example.com',
  return_to: 'https://yourstore.com/some_specific_site',
  remote_ip: '192.0.2.1',
  identifier: 'nic123',
});

License

MIT License.

Copyright (c) 2023 KOMIYA Atsushi.

1.0.0

8 months ago