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

connect-session-firebase

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

connect-session-firebase - npm Package Compare versions

Comparing version 3.2.0 to 3.2.1

4

History.md

@@ -0,1 +1,5 @@

3.2.0 / 2016-07-19
==================
* Update Firebase dependency to v3.2.0
3.1.1 / 2016-07-09

@@ -2,0 +6,0 @@ ==================

25

lib/connect-session-firebase.js

@@ -138,9 +138,8 @@ /*!

const expires = typeof sess.cookie.maxAge === 'number' ? now + sess.cookie.maxAge : now + oneDayInMilliseconds;
const jsonSess = JSON.stringify(sess);
const session = this.db.ref(this.sessions).child(sid);
session.set({
expires: JSON.stringify(expires),
type: 'connect-session',
sess: jsonSess
expires: expires,
sess: JSON.stringify(sess),
type: 'connect-session'
}, fn);

@@ -186,3 +185,3 @@ };

sessions.once('value', snapshot => {
if (snapshot && snapshot.val()) {
if (snapshot.val()) {
snapshot.forEach(session => {

@@ -222,13 +221,11 @@ if (session.val().expires < now) {

session.once('value', snapshot => {
if (!snapshot.val()) {
return fn();
}
try {
if (!snapshot || !snapshot.val()) {
return fn();
}
else {
let currentSess = snapshot.val().sess.toString();
currentSess = JSON.parse(currentSess);
currentSess.cookie = sess.cookie;
let currentSess = JSON.parse(snapshot.val().sess);
currentSess.cookie = sess.cookie;
return this.set(sid, currentSess, fn);
}
return this.set(sid, currentSess, fn);
}

@@ -235,0 +232,0 @@ catch (err) {

{
"name": "connect-session-firebase",
"description": "Firebase session store for Connect/Express",
"version": "3.2.0",
"version": "3.2.1",
"author": "Ben Weier <ben.weier@gmail.com>",

@@ -6,0 +6,0 @@ "main": "./index.js",

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