Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

fastify-auth0-verify

Package Overview
Dependencies
Maintainers
8
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fastify-auth0-verify - npm Package Compare versions

Comparing version
4.0.0
to
4.1.0
+22
eslint.config.js
import js from '@eslint/js'
import importPlugin from 'eslint-plugin-import'
import eslintN from 'eslint-plugin-n'
import eslintPrettier from 'eslint-plugin-prettier/recommended'
import promisePlugin from 'eslint-plugin-promise'
import neostandard from 'neostandard'
export default [
...neostandard({
ignores: neostandard.resolveIgnoresFromGitignore()
}),
js.configs.recommended,
eslintPrettier,
importPlugin.flatConfigs.recommended,
eslintN.configs['flat/recommended'],
promisePlugin.configs['flat/recommended'],
{
rules: {
'n/no-unpublished-require': 'off',
}
}
]
+10
-10
{
"name": "fastify-auth0-verify",
"version": "4.0.0",
"version": "4.1.0",
"description": "Auth0 verification plugin for Fastify",

@@ -51,19 +51,19 @@ "author": "NearForm Ltd",

"@fastify/jwt": "^10.0.0",
"fastify-jwt-jwks": "^2.0.3",
"fastify-jwt-jwks": "^3.0.0",
"fastify-plugin": "^5.1.0"
},
"devDependencies": {
"cross-fetch": "^4.1.0",
"dotenv": "^17.2.3",
"eslint": "^8.23.0",
"eslint-config-prettier": "^9.0.0",
"eslint-config-standard": "^17.1.0",
"@eslint/eslintrc": "^3.3.3",
"@eslint/js": "^9.39.1",
"eslint": "^9.39.1",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-import": "^2.32.0",
"eslint-plugin-n": "^16.0.0",
"eslint-plugin-n": "^17.23.1",
"eslint-plugin-prettier": "^5.5.4",
"eslint-plugin-promise": "^6.0.1",
"eslint-plugin-promise": "^7.2.1",
"fast-jwt": "^6.1.0",
"fastify": "^5.6.2",
"jest": "^30.2.0",
"neostandard": "^0.12.2",
"nock": "^14.0.10",
"node-cache": "^5.1.2",
"prettier": "^3.7.4",

@@ -70,0 +70,0 @@ "tsd": "^0.33.0",

'use strict'
// eslint-disable-next-line n/no-unsupported-features/node-builtins
const { describe, test, before, after, beforeEach, afterEach } = require('node:test')

@@ -10,3 +11,10 @@ const { readFileSync } = require('fs')

/* eslint-disable max-len */
function withResolvers() {
let res, rej
const promise = new Promise((resolve, reject) => {
res = resolve
rej = reject
})
return { promise, resolve: res, reject: rej }
}

@@ -186,3 +194,2 @@ /*

}
/* eslint-enable max-len */

@@ -623,3 +630,3 @@ async function buildServer(options) {

signature:
'HYgGxrwl3vthMChCy44eg-VK0x_SR-mf6761VI9jNk9rMqKZmFcabE7dVUA_hCKFXyj7VL7bJ09i3PxYFkj78PMz28B9hZz_h4ntVuafPmDL9FCHvW91oZTJRhosNor2yyUFcx6ijfu6WeUTZRtQdBqvcAgtKutNl9H0Q0wff-Jn10ViiFJTEmiaC-XhoZFjZQee7_bS7mOZtJCZeH69D_CWrCf4I-N2nl8U1sVHp-H0fRCc5D5SvlIhCsIXYJoFDRAuTtRvwrXXVPlIPugCeJ8l91S-GbIEEUejDCE8JPW9bEGfKoAFBiIbnRBSb4hKEbdFUqWHk-5_YOLzvPnq57vlCB8yeC10exEgiSeSb74tXGZyB4z540Mjt-2k9O9t7Uz1ICDZHvrYLUN2wzlSKqSucOvr5YpH8y-iLaWqAQeiR2b6w0u_c9kMEgzCAaobJp4QxjGkKHfYNmUFlV1uoY5_I2CBls-ICr0_E9PicMBnddg_JG8KabqAmZObCrkM5WRxSPPNLTElmw80MACxFqgaKxsMg-6uqmgTwy9ie9TjYVVdL1pdxWWaLDhzpDN1mmdTuIazfnSaib7PnzgPPgHlN7TnSCmCnYzffAg-i2Fz8JOhiK50mF86hc8n6em6K7cbVLm0nQcA4249D88Um9KBs8AoPXov8HGAS4Khwhk' // eslint-disable-line max-len
'HYgGxrwl3vthMChCy44eg-VK0x_SR-mf6761VI9jNk9rMqKZmFcabE7dVUA_hCKFXyj7VL7bJ09i3PxYFkj78PMz28B9hZz_h4ntVuafPmDL9FCHvW91oZTJRhosNor2yyUFcx6ijfu6WeUTZRtQdBqvcAgtKutNl9H0Q0wff-Jn10ViiFJTEmiaC-XhoZFjZQee7_bS7mOZtJCZeH69D_CWrCf4I-N2nl8U1sVHp-H0fRCc5D5SvlIhCsIXYJoFDRAuTtRvwrXXVPlIPugCeJ8l91S-GbIEEUejDCE8JPW9bEGfKoAFBiIbnRBSb4hKEbdFUqWHk-5_YOLzvPnq57vlCB8yeC10exEgiSeSb74tXGZyB4z540Mjt-2k9O9t7Uz1ICDZHvrYLUN2wzlSKqSucOvr5YpH8y-iLaWqAQeiR2b6w0u_c9kMEgzCAaobJp4QxjGkKHfYNmUFlV1uoY5_I2CBls-ICr0_E9PicMBnddg_JG8KabqAmZObCrkM5WRxSPPNLTElmw80MACxFqgaKxsMg-6uqmgTwy9ie9TjYVVdL1pdxWWaLDhzpDN1mmdTuIazfnSaib7PnzgPPgHlN7TnSCmCnYzffAg-i2Fz8JOhiK50mF86hc8n6em6K7cbVLm0nQcA4249D88Um9KBs8AoPXov8HGAS4Khwhk'
})

@@ -1013,13 +1020,17 @@ })

describe('Cleanup', function () {
test('should close the cache when the server stops', function (t, done) {
test('should close the cache when the server stops', async function (t) {
const NodeCache = require('node-cache')
t.mock.method(NodeCache.prototype, 'close')
buildServer({ secret: 'secret' }).then(server => {
server.close(() => {
t.assert.ok(NodeCache.prototype.close.mock.callCount() > 0)
done()
})
}, done)
const server = await buildServer({ secret: 'secret' })
const { resolve, promise } = withResolvers()
server.close(() => {
t.assert.ok(NodeCache.prototype.close.mock.callCount() > 0)
resolve()
})
await promise
})
})

@@ -1,6 +0,12 @@

require('dotenv').config()
const Fastify = require('fastify')
const fetch = require('cross-fetch')
// eslint-disable-next-line n/no-unsupported-features/node-builtins
const { describe, test, before, after } = require('node:test')
try {
// eslint-disable-next-line n/no-unsupported-features/node-builtins
process.loadEnvFile()
} catch (e) {
console.error('Failed to load .env file', e)
}
if (

@@ -79,2 +85,3 @@ !process.env.AUTH0_DOMAIN ||

test('Returns protected route when expected auth header is provided', async t => {
// eslint-disable-next-line n/no-unsupported-features/node-builtins
const authResponse = await fetch(`https://${process.env.AUTH0_DOMAIN}/oauth/token`, {

@@ -81,0 +88,0 @@ method: 'POST',

module.exports = {
extends: ['standard', 'plugin:prettier/recommended'],
overrides: [
{
extends: ['standard', 'plugin:prettier/recommended'],
files: ['test/**']
}
]
}