express-basic-auth icon indicating copy to clipboard operation
express-basic-auth copied to clipboard

Plug & play basic auth middleware for express

Results 23 express-basic-auth issues
Sort by recently updated
recently updated
newest added

We had to use the basic auth on one of our routers today and we figured out in the code that it is possible to add to only one router...

Funny Story 🙂 app.use(basicAuth({ users: { 'admin': 'supersecret' } })) When the supersecret contains an exclamation mark Safari shows a blank page 🙂 question marks for example work. The issue...

# Background Current behavior supports: - string (rendered as text in response) - object (rendered as JSON object in response) # Enhancement Enable passing a normal middleware. This allows full...

I can't figure out how to use express-basic-auth correctly. If I make a POST-request to "/abort" with correct authorization everything seams to work correctly. But if I enter the wrong...

I'm running an express API with an AWS Lambda proxy function using [@vendia/serverless-express](https://www.npmjs.com/package/@vendia/serverless-express). Locally the route produces the challenge prompt, but when deployed I only get the 401 unauthorized and...

When using express as a proxy server using node-http-proxy, and express-basic-auth as middleware, this middleware needs to get the authorization from the Proxy-Authentication header instead. This is described in the...

The provided typescript usage produces a typescript error: ``` import * as basicAuth from 'express-basic-auth' app.use(basicAuth(options), (req: basicAuth.IBasicAuthedRequest, res, next) => { res.end(`Welcome ${req.auth.user} (your password is ${req.auth.password})`) next() })...

Can express-basic-auth be used with jwt? How would that work? Thanks

Hi, thanks for the library. I am implementing a simple auth mechanism but was wondering if there is any easy way to have bcrypt hashes in the code instead of...

enhancement

I think a good approach would be to check if req.auth exists already. If yes, a previous method already authenticated. ```javascript return function authMiddleware(req, res, next) { if (req.auth) return...

v2