
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
Library for authentication middleware using JWT
Initialize Authilize instance
const router = require("express").Router();
const { postController } = require("../controllers/controller");
const { isAuth, isAuthPass } = require("Authilize");
// POST
router.post("/", isAuth, postController);
router.post("/", isAuthPass, postController);
module.exports = router;
Controller example
exports.postController = async (req, res, next) => {
const { username, email } = req.decodedData // Get your data from req.decodedData.
return res.status(200).json({ message: "successful" });
};
You can customize it as you like
if not then the status code will be 401 by default and error message will be "Unauthorized Access"
.env (VARIABLES MUST BE THE SAME)
AUTHILIZE_JWT_SECRET_KEY = Fdjjfklsdjfklasf
AUTHILIZE_STATUS_CODE = 401
AUTHILIZE_ERR_MESSAGE = Unauthorized Access
| Functions | Description |
|---|---|
isAuth | Function which checks if the user is authorized (retrieves bearer token from req) |
isAuthPass | Function which checks if the user is authorized (retrieves bearer token from req) |
| Functions | Description | Default |
|---|---|---|
AUTHILIZE_JWT_SECRET_KEY | required (only for isAuth) | |
AUTHILIZE_STATUS_CODE | optional | 401 |
AUTHILIZE_ERR_MESSAGE | optional | "Unauthorized Access" |
NPM:
npm install authilize
Yarn:
yarn add authilize
FAQs
Library for authentication middleware using JWT
We found that authilize 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.