
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.
@funcmaticjs/auth0-plugin
Advanced tools
Verifies an Auth0 JWT token in the 'Authorization' header and puts the decoded token in 'ctx.state.auth'
Verifies an Auth0 JWT token
$> npm install --save @funcmaticjs/auth0-plugin
const func = require('@funcmaticjs/funcmatic')
const Auth0Plugin = require('@funcmaticjs/auth0-plugin')
...
func.use(new Auth0Plugin())
The following variables must exist in ctx.env during the env handler:
FUNC_AUTH0_DOMAIN: The Auth0 domain from your Auth0 account (e.g. "xyz.auth0.com"). To find your Auth0 domain, see Auth0's documentatation, Learn the Basics.FUNC_AUTH0_SKIP_VERIFICATION (OPTIONAL): If set to the string value of 'true', then the Auth0Plugin will decode the token WITHOUT verifying that it was issued by Auth0 for your Auth0 domain. Recommended to only be used in unit testing so that you can test with a mocked token rather than a real issued token from Auth0.ctx.event.headers['Authorization']: The Auth0Plugin will check for a JWT token in the Authorization http header (i.e. ctx.event.headers['Authorize']) with the format: Bearer Your.JWTTokenHere. If no Authorization header value is sent by the client, then it is considered a failed authentication (see No Authorization Token Sent below).ctx.state.auth: The Auth0Plugin will first verify the token is valid, and then store the results of the decoded token in ctx.state.auth. If the token is not valid (e.g. expired), then it will store{
success: true,
t: 1562517085196, // ms since epoch i.e. Date.now()
decoded: {
/* the decoded JWT token */
}
}
{
success: true,
t: 1562517085196, // ms since epoch i.e. Date.now()
error: true,
errorMessage: "Some reason for the error"
}
{
success: true,
t: 1562517085196, // ms since epoch i.e. Date.now()
error: true,
errorMessage: "No token provided"
}
FAQs
Verifies an Auth0 JWT token in the 'Authorization' header and puts the decoded token in 'ctx.state.auth'
We found that @funcmaticjs/auth0-plugin 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.