cookie-session
a12n-server
cookie-session | a12n-server | |
---|---|---|
3 | 16 | |
1,104 | 423 | |
0.1% | 0.5% | |
7.2 | 8.3 | |
3 months ago | about 1 month ago | |
JavaScript | TypeScript | |
MIT License | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
cookie-session
-
Stop using JSON Web Tokens for user sessions
The lack of logout and XSS are problems, but I ran into a couple apps that completely forgot to expire sessions due to lacking framework support. In nodejs's cookie-session and @google-cloud/connect-firestore sessions never expire. This issue impacts downstream software including, awkwardly enough, Google's Passkey demo apps. There isn't interest in fixing this.
Make sure your app is actually using a JWT framework, not a lesser version, and implements basic security practices.
[1] https://github.com/expressjs/cookie-session
[2] https://github.com/googleapis/nodejs-firestore-session
-
Node Authentication Questions
Side note: a JWT in an HttpOnly cookie, which is what some people advocate, is still a cookie-based session. Using a library like cookie-session would already give you the ability to have a signature-verified JSON payload, just like using a JWT would.
-
JWT should not be your default for sessions
Frameworks usually sign cookies by default, or at least offer an option to do so. Some (like Ruby on Rails) can encrypt them for you too. There's nothing really stopping you from storing data in them just like you would a JWT. In fact, frameworks and session libraries often use this cookie storage by default (even in the Node ecosystem, e.g: koa-session, express cookie-session), since an in-memory store can grow to an arbitrary size. Of course, you can also just store a JWT in a cookie, which has the advantage of being standardized in terms of claims and signing algorithms etc.
a12n-server
-
Examples of APIs that follows the best practices and are production ready on Github?
I wrote a small OAuth2 serer with NodeJS: https://github.com/curveball/a12n-server
- Architecting Node the Node way?
-
Passport.js alternatives in 2022
a12n-server. Lightweight, Node.js. Just run npm start to run it and all based around OAuth2. I've been working on this for almost 5 years =)
-
Writing my own logins Vs Third party Authentication
There's open source OAuth2 providers too that you can self-host. a12n-server is one of them, and the steps to get it up and running are:
-
Keycloak: Open-Source Identity and Access Management
Another OAuth2 server, that's well on the other side of the heavyweight spectrum vs. keycloak:
https://github.com/curveball/a12n-server
-
What are some good quality open source rest apis based on expressjs to learn from? Preferably using postgresql
I'm working on one that supports posgresql (and also mysql, sqlite): https://github.com/curveball/a12n-server
- express js I need help with a large API
- Good Backend Projects to learn from?
- Suggest some intermediate level projects.
- Single Sign On
What are some alternatives?
vue-cookies - A simple Vue.js plugin for handling browser cookies
Ory Hydra - OpenID Certified™ OpenID Connect and OAuth Provider written in Go - cloud native, security-first, open source API security for your infrastructure. SDKs for any language. Works with Hardware Security Modules. Compatible with MITREid.
body-parser - Node.js body parsing middleware
dex - OpenID Connect (OIDC) identity and OAuth 2.0 provider with pluggable connectors
csurf - CSRF token middleware
authentication-server - The authentication-server is a node app that handles user registration, authentication & authorization with JWT.
session - Simple session middleware for Express
OpenUnison - Unified Identity Management
cookie-parser - Parse HTTP request cookies
deno-oauth2-client - Minimalistic OAuth 2.0 client for Deno.
session - Simple session middleware for koa
adfsmfa - MFA for ADFS 2022/2019/2016/2012r2