Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

connect-firebase

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

connect-firebase

Firebase session store for Connect

  • 0.0.9
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
66
decreased by-22.35%
Maintainers
1
Weekly downloads
 
Created
Source

Connect Firebase

connect-firebase is a Firebase session store backed by the firebase sdk

NPM NPM

Installation

  $ npm install connect-firebase

Options

  • host An existing Firebase to store sessions
  • token (optional) A Firebase authentication token
  • reapInterval (optional) how often expired sessions should be cleaned up (defaults to 21600000) (6 hours in milliseconds)

Usage

var options = {

  // The URL you were given when you created your Firebase
  host: 'connect-sessions.firebaseio.com',

  // Optional. A Firebase authentication token
  token: 'qKtOKAQSTCxLFJI7uSeof6H7cfLpSuWYOhqOTQqz',

  // Optional. How often expired sessions should be cleaned up.
  // Defaults to 21600000 (6 hours).
  reapInterval: 600000

};

var connect = require('connect'),
  FirebaseStore = require('connect-firebase')(connect);
connect()
  .use(connect.cookieParser())
  .use(connect.session({ store: new FirebaseStore(options), secret: 'keyboard cat'}))

Or with express

NOTE: Due to express 4.x.x changes, we now need to pass express-session to the function connect-firebase exports in order to extend express-session.Store:

var session = require('express-session'),
  FirebaseStore = require('connect-firebase')(session);
app.use(session({
  store: new FirebaseStore(options), 
  secret: 'keyboard cat' 
  resave: true, 
  saveUninitialized: true
}));

License

connect-firebase is licensed under the MIT license.

FAQs

Package last updated on 29 Jan 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc