stage-auth-middleware
v1.0.9
Published
Auth Service For our Stage sites, so only Akarion Users can access it
Downloads
628
Readme
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>