stage-auth-middleware

1.0.9 • Public • Published

Stage Auth Middleware

To be used on staging sites of akarion. This will force users to authenticate in order to access a stage URL and display a hint that they are on the stage site.

Install

npm install stage-auth-middleware --save

Now you can use it in your server with

const express = require('express');
const stageAuthMiddleware = require('stage-auth-middleware');

const app = express();

app.use(stageAuthMiddleware({
  pass: 'super-secure-password',
  enabled: process.env.NODE_ENV !== 'production',
}));

Now add the script to your index.html file(s)

<script src="/stage-auth-middleware.js" async defer></script>

/stage-auth-middleware/

    Package Sidebar

    Install

    npm i stage-auth-middleware

    Weekly Downloads

    81

    Version

    1.0.9

    License

    ISC

    Unpacked Size

    6.05 kB

    Total Files

    8

    Last publish

    Collaborators

    • paulem