fastify-authz-jwks

1.1.13 • Public • Published

fastify-authz-secret-provider

Auth0 secret provider integration through jwks-rsa in Fastify.

Install

$ npm install -S fastify-authz-jwks

Usage:

const fastifySecretProvider = require('fastify-authz-jwks');
const fastifyJwt = require('fastify-jwt');

fastify.register(fastifyJwt, {
  secret: fastifySecretProvider({
    cache: true,
    rateLimit: true,
    jwksRequestsPerMinute: 5,
    jwksUri: 'https://__tenant__.auth0.com/.well-known/jwks.json',
  }),
  audience: 'https://api.example.com',
  issuer: 'https://__tenant__.auth0.com/',
  algorithms: ['RS256'],
  decode: { complete: true },
});

Motivation

A PR created on Auth0's GitHub has gone stale waiting for review on this integration, so I've created this fork to avoid further manual implementations 🚀

Package Sidebar

Install

npm i fastify-authz-jwks

Weekly Downloads

28

Version

1.1.13

License

MIT

Unpacked Size

11 kB

Total Files

10

Last publish

Collaborators

  • vcanales