
Research
/Security News
Chrome and Firefox Extensions Posing as Free VPNs Add Clipboard Stealers via Malicious Updates
Malicious Chrome and Firefox extensions posed as free VPNs while stealing clipboard data through later extension updates.
A simple and flexible JWT middleware for H3 applications. H3 is a minimal h(ttp) framework built for high performance and portability.
A simple and flexible JWT middleware for H3 applications. H3 is a minimal h(ttp) framework built for high performance and portability.
npm install h3-jwt --save
import {createApp, eventHandler, toNodeListener,} from "h3";
import {createServer} from "node:http";
import h3Jwt from "../src/middleware/jwtMiddleware";
const app = createApp();
const port = process.env.PORT || 3000;
const secret = process.env.JWT_SECRET || "secret"
app.use("/", eventHandler((event) => {
app.use('/hello', eventHandler((event) => {
// console.log(event._headers)
return {
message: "Hello World"
}
}))
app.use('/login', eventHandler((event) => {
// console.log(event._headers)
return {
message: "Login"
}
}))
app.use(h3Jwt({
secretKey: secret,
getToken: h3Cookie("token"),
algorithms: ["HS256"]
}))
app.use('/protected', eventHandler((event) => {
return {
message: "Protected route"
}
}))
}))
import { h3Jwt, fromHeader, fromCookie } from 'h3-jwt';
app.use('/protected', h3Jwt({
secret: 'YOUR_SECRET_KEY',
getToken: (event) => {
return h3Header() || h3Cookie('cookieName') || h3Query('queryName');
}
}));
Detail the options users can pass to your middleware, like:
Authorization header.This package is thoroughly tested. To run tests:
npm test
Contributions are welcome! Please open an issue or submit a pull request.
This package is licensed under the MIT License. See the LICENSE file for details.
FAQs
A simple and flexible JWT middleware for H3 applications. H3 is a minimal h(ttp) framework built for high performance and portability.
We found that h3-jwt 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.

Research
/Security News
Malicious Chrome and Firefox extensions posed as free VPNs while stealing clipboard data through later extension updates.

Research
/Security News
Miasma Mini Shai-Hulud hits @immobiliarelabs Backstage plugins, targeting GitLab and LDAP auth packages on npm.

Security News
Rolldown paused Rust React Compiler integration after a 5MB binary size increase raised concerns about shipping React-specific code to all Vite users.