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.
npm i --save next-session-client
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();