# haramultipass

> Haravan Multipass module for Node.js

Latest version **1.0.3** (published 2019-03-08) · 0 weekly downloads

## Install

```sh
npm install haramultipass
pnpm add haramultipass
yarn add haramultipass
bun add haramultipass
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2019-03-08 |
| First published | 2019-03-08 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | lmcuong29 |
| Keywords | haravan, multipass, haramultipass |

## Links

- npm: https://www.npmjs.com/package/haramultipass
- Repository: https://github.com/Haravan/haramultipass
- Issues: https://github.com/Haravan/haramultipass/issues
- npm.io page: https://npm.io/package/haramultipass

## Dependencies (1)

- [crypto](https://npm.io/package/crypto.md) 0.0.3

## Recent versions

- 1.0.3 (latest) — 2019-03-08
- 1.0.2 — 2019-03-08

## README

haramultipass
============

Haravan Multipass module for Node.js



[Haravan](https://www.haravan.com/) 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](https://docs.haravan.com/blogs/ui-integrations/1000017816-multipass).

## Installation
<pre>
    npm install haramultipass
</pre>

## 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.

``` js
  var Haramultipass = require('haramultipass');

  // Construct the Haramultipass encoder
  var haramultipass = new Haramultipass("HARAVAN MULTIPASS SECRET");

  // Create your customer data hash
  var customerData = { email: 'test@example.com', remote_ip:'USERS IP ADDRESS', return_to:"http://some.url"};

  // Encode a Multipass token
  var token = haramultipass.encode(customerData);

  // Generate a Haravan multipass URL to your shop
  var url = haramultipass.generateUrl(customerData, "yourstorename.myharavan.com");

  // Generates a URL like:  https://yourstorename.myharavan.com/account/login/multipass/<MULTIPASS-TOKEN>
```

---
_Source: https://npm.io/package/haramultipass · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
