5.0.1 • Published 3 months ago

next-session-client v5.0.1

Weekly downloads
20
License
-
Repository
-
Last release
3 months ago

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