next-session-client

5.0.1 • Public • Published

Next Session Client

CircleCI

A client for working with the Next Session service.

Note: this module is for client side usage only; if working from the server, talk to the Membership Session service directly.

Installing

npm i --save next-session-client

Usage

const session = require('next-session-client');

// get the user's uuid from their session
session.uuid()
    .then(({ uuid }) => {
		// uuid is `undefined` if session isn't valid
	});

// get user's products
session.products()
    .then(({ products, uuid }) => {
    });

// get (secure) session id
const sessionId = session.sessionId();

Readme

Keywords

none

Package Sidebar

Install

npm i next-session-client

Weekly Downloads

1,754

Version

5.0.1

License

none

Unpacked Size

15.4 kB

Total Files

18

Last publish

Collaborators

  • the-ft