
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
koa-jwt-session
Advanced tools
Barebone JWT based session for Koa 2. Tests and configurable options comming soon.
The API is exposed on the context object (this
) inside downstream middlewares.
import JWTSession from 'koa-jwt-session';
import Koa from 'koa';
const app = new Koa();
app.use(jwtAuth(app, {
secret: "Shhhha",
signed: false, // Default to false
httpOnly: false, // Default to false
domain: process.env.SESSIONS_SCOPE // Cookie scope. Must be set
}));
// Generate a Session from a controller (route handler)
async function(ctx, next) {
const formFields = await parse(ctx)
// store session
const data = ctx.JWTSession.generate({_id: formFields._id, nickname: formFields.nickname});
}
// Validating a session from a controller (route handler)
async function(ctx, next) {
const authed = ctx.JWTSession.authed();
if ( authed ) {
// Do something that requires auth
} else {
// Handle error
}
FAQs
Barebone JWT Session management for Koa
The npm package koa-jwt-session receives a total of 0 weekly downloads. As such, koa-jwt-session popularity was classified as not popular.
We found that koa-jwt-session demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.