Skip to content

Latest commit

 

History

History
29 lines (19 loc) · 919 Bytes

README.md

File metadata and controls

29 lines (19 loc) · 919 Bytes

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();