Package detail

fastify-auth0-verify

nearform49.7kApache-2.03.0.0

Auth0 verification plugin for Fastify

fastify, fastify-plugin, auth0

readme

fastify-auth0-verify

Package Version ci

Auth0 verification plugin for Fastify.

Internally this is a lighweight wrapper around fastify-jwt-jwks and accepts most of the same options. The differences are highlighted in this document. Refer to the documentation in the fastify-jwt-jwks repository for general usage.

Installation

Just run:

npm install fastify-auth0-verify --save

Usage

The configuration options for this plugin are similar to those in fastify-jwt-jwks, except that this package accepts a domain option instead of jwksUrl:

  • domain: The Auth0 tenant domain. It enables verification of RS256 encoded JWT tokens. It is also used to verify the token issuer (iss). Either provide a domain (domain.com) or the full URL, including the trailing slash (https://domain.com/).

Contributing

See CONTRIBUTING.md

Developer notes

Tests

Tests are currently split into unit and integration. Integration tests need the following environment variables:

Env var
AUTH0_DOMAIN Auth0 dashboard -> application -> Settings -> Domain
AUTH0_CLIENT_ID Auth0 dashboard -> application -> Settings -> Client ID
AUTH0_CLIENT_SECRET Auth0 dashboard -> application -> Settings -> Client Secret
AUTH0_API_AUDIENCE Auth0 application identifier

License

Copyright NearForm Ltd. Licensed under the Apache-2.0 license.

changelog

2020-12-01 / 0.4.0

  • feat: Merge pull request #43 from nearform/chore/cli-example
  • chore: add cli example
  • feat: Merge pull request #42 from nearform/dependabot/npm_and_yarn/prettier-2.2.1
  • chore(deps-dev): Bump prettier from 2.2.0 to 2.2.1
  • fix: Merge pull request #41 from nearform/fix/close-cache
  • chore: switch to node-fetch
  • fix: close cache on server close
  • feat: Merge pull request #38 from nearform/dependabot/npm_and_yarn/eslint-plugin-standard-5.0.0
  • feat: Merge pull request #37 from nearform/dependabot/npm_and_yarn/eslint-7.14.0
  • chore(deps-dev): Bump eslint-plugin-standard from 4.1.0 to 5.0.0
  • chore(deps-dev): Bump eslint from 7.13.0 to 7.14.0
  • feat: Merge pull request #36 from nearform/dependabot/npm_and_yarn/prettier-2.2.0
  • chore(deps-dev): Bump prettier from 2.1.2 to 2.2.0
  • feat: Merge pull request #35 from nearform/dependabot/npm_and_yarn/eslint-config-standard-16.0.2
  • chore(deps-dev): Bump eslint-config-standard from 16.0.1 to 16.0.2
  • feat: Update ci.yml
  • feat: Merge pull request #33 from nearform/dependabot/npm_and_yarn/eslint-config-standard-16.0.1
  • chore(deps-dev): Bump eslint-config-standard from 14.1.1 to 16.0.1
  • fix: Merge pull request #34 from nearform/fix-typo
  • feat: Fix typo in CI
  • feat: Use auto merge action (#32)
  • feat: Merge pull request #20 from nearform/dependabot/npm_and_yarn/eslint-7.13.0
  • chore(deps-dev): Bump eslint from 7.5.0 to 7.13.0
  • chore: run ci only on PR (#31)
  • feat: Merge pull request #30 from nearform/dependabot/npm_and_yarn/fastify-plugin-3.0.0
  • feat: Merge pull request #29 from nearform/dependabot/npm_and_yarn/nock-13.0.5
  • chore(deps): Bump fastify-plugin from 2.0.1 to 3.0.0
  • feat: Merge pull request #28 from nearform/dependabot/npm_and_yarn/got-11.8.0
  • chore(deps-dev): Bump nock from 13.0.2 to 13.0.5
  • chore(deps): Bump got from 11.5.1 to 11.8.0
  • feat: Merge pull request #26 from nearform/dependabot/npm_and_yarn/fastify-3.8.0
  • feat: Merge pull request #27 from nearform/dependabot/npm_and_yarn/eslint-config-standard-14.1.1
  • feat: Merge pull request #25 from nearform/dependabot/npm_and_yarn/eslint-plugin-import-2.22.1
  • feat: Merge pull request #23 from nearform/dependabot/npm_and_yarn/eslint-plugin-standard-4.1.0
  • feat: Merge pull request #24 from nearform/dependabot/npm_and_yarn/jest-26.6.3
  • feat: Merge pull request #22 from nearform/dependabot/npm_and_yarn/fastify-jwt-2.1.3
  • chore(deps-dev): Bump eslint-config-standard from 14.1.0 to 14.1.1
  • feat: Merge pull request #21 from nearform/dependabot/npm_and_yarn/node-cache-5.1.2
  • chore(deps-dev): Bump fastify from 3.1.1 to 3.8.0
  • chore(deps-dev): Bump eslint-plugin-import from 2.18.2 to 2.22.1
  • feat: Merge pull request #19 from nearform/dependabot/npm_and_yarn/prettier-2.1.2
  • chore(deps-dev): Bump jest from 26.1.0 to 26.6.3
  • feat: Merge pull request #18 from nearform/dependabot/npm_and_yarn/http-errors-1.8.0
  • chore(deps-dev): Bump eslint-plugin-standard from 4.0.1 to 4.1.0
  • chore(deps): Bump fastify-jwt from 2.1.2 to 2.1.3
  • chore(deps): Bump node-cache from 5.0.1 to 5.1.2
  • chore(deps-dev): Bump prettier from 2.0.5 to 2.1.2
  • chore(deps): Bump http-errors from 1.7.3 to 1.8.0
  • chore: dependabot auto merge (#17)
  • chore(deps): Bump find-my-way from 3.0.1 to 3.0.5 (#16)

2019-11-20 / 0.2.0

  • chore: Added CHANGELOG.md
  • fix: Switch to got for HTTP fetching. Fixes #5.
  • chore: Fix README example. Fixes #5.

2019-11-20 / 0.1.0

  • chore: Disable coverage.
  • chore: Remove codecov.
  • chore: Add GitHub CI action.
  • fix: Throw in case of bad options. Fixes #3.
  • fix: Do not swallow errors. Fixes #4.
  • feat: Introduce RS256 key caching. Closes #2.
  • feat: Use strict mode. Closes #1.
  • feat: Initial commit.