Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@fastify/auth

Package Overview
Dependencies
Maintainers
19
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fastify/auth - npm Package Compare versions

Comparing version 3.0.2 to 4.0.0

test/example-async.js

21

package.json
{
"name": "@fastify/auth",
"version": "3.0.2",
"version": "4.0.0",
"description": "Run multiple auth functions in Fastify",

@@ -33,17 +33,16 @@ "repository": {

"devDependencies": {
"@fastify/jwt": "^6.0.0",
"@fastify/jwt": "^6.3.2",
"@fastify/leveldb": "^5.0.1",
"@fastify/type-provider-json-schema-to-ts": "^1.0.0",
"@fastify/type-provider-typebox": "^1.0.0",
"@types/node": "^18.0.0",
"fastify": "^4.0.0-rc.3",
"pre-commit": "^1.2.2",
"@fastify/pre-commit": "^2.0.2",
"@fastify/type-provider-json-schema-to-ts": "^2.1.1",
"@fastify/type-provider-typebox": "^2.3.0",
"@types/node": "^18.7.14",
"fastify": "^4.5.3",
"rimraf": "^3.0.2",
"standard": "^17.0.0",
"tap": "^16.0.0",
"tsd": "^0.21.0",
"typescript": "^4.0.2"
"tap": "^16.3.0",
"tsd": "^0.23.0"
},
"dependencies": {
"fastify-plugin": "^3.0.0",
"fastify-plugin": "^4.0.0",
"reusify": "^1.0.4"

@@ -50,0 +49,0 @@ },

@@ -8,3 +8,3 @@ # @fastify/auth

This module does not provide an authentication strategy, but it provides a very fast utility to handle authentication (and multiple strategies) in your routes, without adding overhead.
Check out a complete example [here](https://github.com/fastify/fastify-auth/blob/master/example.js).
Check out a complete example [here](test/example.js).

@@ -76,3 +76,3 @@ ## Install

```
_For more examples, please check [`example-composited.js`](example-composited.js)_
_For more examples, please check [`example-composited.js`](test/example-composited.js)_

@@ -110,3 +110,3 @@ This plugin support `callback` and `Promise` returned by the functions. Note that an `async` function **does not have** to call the `done` parameter, otherwise the route handler to which the auth methods are linked to [might be called multiple times](https://www.fastify.io/docs/latest/Hooks/#respond-to-a-request-from-a-hook):

Keep in mind that route definition should either be done as [a plugin](https://github.com/fastify/fastify/blob/master/docs/Plugins.md) or within an `.after()` callback.
For a complete example implementation, see [example.js](example.js).
For a complete example implementation, see [example.js](test/example.js).

@@ -113,0 +113,0 @@ `@fastify/auth` will run all your authentication methods and your request will continue if at least one succeeds, otherwise it will return an error to the client.

@@ -6,3 +6,3 @@ 'use strict'

const rimraf = require('rimraf')
const build = require('../example-async')
const build = require('./example-async')

@@ -9,0 +9,0 @@ let fastify = null

@@ -5,3 +5,3 @@ 'use strict'

const test = t.test
const build = require('../example-composited')
const build = require('./example-composited')

@@ -8,0 +8,0 @@ let fastify = null

@@ -6,3 +6,3 @@ 'use strict'

const rimraf = require('rimraf')
const build = require('../example')
const build = require('./example')

@@ -9,0 +9,0 @@ let fastify = null

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc