Socket
Socket
Sign inDemoInstall

@nymdev/express-nymag-user

Package Overview
Dependencies
Maintainers
3
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nymdev/express-nymag-user - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

5

package.json
{
"name": "@nymdev/express-nymag-user",
"version": "0.0.1",
"version": "0.0.2",
"description": "Handles in-house authentication as middleware for express via a cookie",
"main": "index.js",
"scripts": {
"test": "eslint && mocha"
},
"repository": {

@@ -10,0 +7,0 @@ "type": "git",

17

readme.md

@@ -12,12 +12,15 @@ Express NYMag User

```js
app.use(require('@nymdev/express-nymag-user')({
const express = require('express'),
app = express(),
expressNYMagAuth = require('@nymdev/express-nymag-auth'),
authServer = 'http://auth.nymag.com:5000/login?redirect_to=';
//what domains to enable blocking for
blockDomains: ['qa.nymag.com', 'nymag.com', 'nymetro.com'],
//logic for blocking
app.use(expressNYMagAuth({
blockDomains: ['nymag.com'],
redirectTo: function (originalUrl) {
return authServer + encodeURIComponent(originalUrl);
},
isProtected: function (req) {
return !!req.query.edit;
}
}));

@@ -30,2 +33,2 @@ ```

npm install --save @nymdev/express-nymag-auth
```
```
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