Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including hapi-session with all npm packages installed. Try it out:

var hapiSession = require("hapi-session")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

hapi-session v0.1.2

A simpler session based auth plugin for Hapi

Hapi-Session

This is a session based auth scheme for Hapi. A lot of the code was gratuitously stolen from the cookie auth scheme in the Hapi code, and this module works in much the same way. The biggest difference is in that rather than storing the entire session object in the cookie, this module stores only an ID. The rest of the data is stored in your Hapi server's cache, and retrieved when required. This gets around the issue of storing large amounts of data in the session without causing a race condition.

For example usage see the server.js in the examples directory

Metadata

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free