ca98am79 / connect-firebase Goto Github PK
View Code? Open in Web Editor NEWFirebase session store for Connect
License: MIT License
Firebase session store for Connect
License: MIT License
Hi,
I am looking at how to set rolling
option in with connect-firebase, but it seems that connect-firebase is re-utilising cookie.maxAge
for the expires functionality, in other implementations (redis, mongo) this is a different setting (ttl).
Setting the cookie.maxAge
gives an impression of the rolling session, but because it's also the cookie setting, it means the cookie is valid even after the browser is closed.
The changes would be as follows:
- var expires = typeof sess.cookie.maxAge === 'number' ? (+new Date()) + sess.cookie.maxAge : (+new Date()) + oneDayInMilliseconds;
+ var expires = typeof this.ttl === 'number' ? ((+new Date()) + this.ttl) : (+new Date()) + oneDayInMilliseconds;
Is that a change you'd want to see as a PR?
Thanks
Hi,
Does connect-firebase removes the expired sessions from Firebase or is that a separate process?
Thanks!
FIREBASE WARNING: FirebaseRef.auth() being deprecated. Please use FirebaseRef.authWithCustomToken() instead.
Hello,
First off, thanks a ton for this project is has been very helpful. I've been working on something similar, but you've done a way better job. nice work!
How do you feel about adding a callback that gets called by the reap interval function when a session is expired? Take the scenario where i add a user id to the session and add the session id to the user. If I want to reap outdated sessions from my user i would be able to handle this within the reap callback. Obviously, it would be a non-required method that would only get called if defined.
I can issue a PR for it if the contributors are interested.
Thanks!
Hi,
Any plans to support firebase 3?
Cheers
express-session now supports a .touch
method on session stores.
This method should just update the expiry. It allows you to set resave: false
and avoid race conditions that cause session data trampling.
Hi, really useful library.
When maxAge
is set, is there an extra configuration that needs to be setup to prevent the cookie itself from expiring?
Thanks
getting
Fri, 02 Oct 2015 18:18:45 GMT express-session deprecated undefined resave option; provide resave option at firebase-session\store.js:7:13
Fri, 02 Oct 2015 18:18:45 GMT express-session deprecated undefined saveUninitialized option; provide saveUninitialized option at firebase-session\store.js:7:13
when starting up with connect-firebase
This would allow for passing in a full firebase url with the https:// already prefixed to the host.
var options = {
// The URL you were given when you created your Firebase
url: 'https://connect-sessions.firebaseio.com',
};
Might also be worth making the host option a bit more forgiving or at least providing a more specific error message. Right now if you pass a full firebase url as the host you will receive back a generic error from the firebase library.
FIREBASE FATAL ERROR: Cannot parse Firebase url. Please use https://<YOUR FIREBASE>.firebaseio.com
This error at least points you in the right direction but would be nice if it told you exactly what was wrong.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.