Socket
Socket
Sign inDemoInstall

@remap/authenticate-middleware

Package Overview
Dependencies
Maintainers
2
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@remap/authenticate-middleware - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

7

index.js
const { STATUS_CODES } = require('http')
const { createError } = require('micro-errors')
const { Authentication } = require('@remap/services')
const ReMap = require('@remap/services')

@@ -10,5 +10,6 @@ const STATUS_MESSAGE_400 = STATUS_CODES[400]

module.exports = ({ authenticate = Authentication.authenticate } = {}) => {
module.exports = ({ authenticate } = {}) => {
if (typeof authenticate !== 'function') {
throw new TypeError('`authenticate` service client must be function')
const remap = new ReMap()
authenticate = remap.authenticate.bind(remap)
}

@@ -15,0 +16,0 @@

{
"name": "@remap/authenticate-middleware",
"version": "1.1.0",
"version": "1.1.1",
"description": "ReMap Authenticate Middleware",

@@ -30,3 +30,3 @@ "main": "index.js",

"dependencies": {
"@remap/services": "^1.1.0",
"@remap/services": "^2.0.0",
"micro-errors": "^2.0.0"

@@ -37,3 +37,3 @@ },

"cross-fetch": "^2.2.2",
"eslint": "^5.5.0",
"eslint": "^5.6.1",
"eslint-plugin-ava": "^5.1.1",

@@ -40,0 +40,0 @@ "eslint-plugin-node": "^7.0.1",

@@ -22,2 +22,10 @@ # authenticate-middleware

// req.auth
// {
// name: string;
// picture: string;
// auth_time: number;
// email: string;
// email_verified: boolean;
// uid: string;
// }
}

@@ -30,5 +38,5 @@ )

```js
const middlwware = authenticateMiddleware({
const middleware = authenticateMiddleware({
authenticate: async () => await doSomething(),
})
```
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