haramultipass
Haravan Multipass module for Node.js
Haravan provides a mechanism for single sign-on known as Multipass. Multipass uses an AES encrypted JSON hash and haramultipass provides functions for generating tokens
More details on Multipass with Haravan can be found here.
Installation
npm install haramultipass
Usage
To use Multipass an Enterprise / Plus plan is required. The Multipass secret can be found in your shop Admin (Settings > Checkout > Customer Accounts). Make sure "Accounts are required" or "Accounts are optional" is selected and Multipass is enabled.
var Haramultipass = ;// Construct the Haramultipass encodervar haramultipass = "HARAVAN MULTIPASS SECRET";// Create your customer data hashvar customerData = email: 'test@example.com' remote_ip:'USERS IP ADDRESS' return_to:"http://some.url";// Encode a Multipass tokenvar token = haramultipass;// Generate a Haravan multipass URL to your shopvar url = haramultipass;// Generates a URL like: https://yourstorename.myharavan.com/account/login/multipass/<MULTIPASS-TOKEN>