1.0.5 • Published 4 years ago

express-login-protection v1.0.5

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

Express Login Protection

A small module that redirects users away from protected routes to a different route/link

Install

npm install express-login-protection

Usage

Passing no options to Login() will result in a default redirect URL of Rick Astley's Never Gonna Give You U ( You have been warned :) )

var login = require('./node_modules/login-protection');

//Pass an array of URLs to protect and an url to redirect to.
app.use(login({
    urls: ["/login", "/wp-login.php", "/wp-login"],
    redirectURL: "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
}));

Inspiration

Tweet by @LiamHammett

Tweet by @LiamHammett

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.0

4 years ago