koajs / basic-auth Goto Github PK
View Code? Open in Web Editor NEWblanket basic auth middleware
blanket basic auth middleware
I was wondering if anyone is working on migrating this middleware to Koa v.2.x?
If not, can I do an implementation in the upcoming week? Thank you.
Hello there,
I use a basic auth on my server side rendering project with this repo.
Interestingly, After authenticating on /
, I can see in the network devtools panel the /manifest.json
route serves a 401. Indeed the basic auth is not passed for this route. This is the one and only route which has the problem.
In firefox, the route is not even fetched.
Manifest.json is for making single page application as desktop/mobile web app using service worker.
Looks like chrome does not want to pass the Authorization
request header for this route as explained here:
web-push-libs/pywebpush#42
and https://developers.google.com/web/ilt/pwa/introduction-to-push-notifications
Does someone know if there is a way to work with basic auth
and manifest.json
?
Maybe using koa-cors?
Like proposed here: https://groups.google.com/a/chromium.org/forum/#!topic/chromium-discuss/ZLXwilWYwZs
Thank you,
A lot of API's only require a user, or a pass, but not both.
This package requires that both be present.
Can we please patch this to allow either a user AND/OR a pass?
var auth = basicAuth(this);
if (auth) ...
I (and presumable others) have a bit of a hard time understanding how I could use this to protect certain routes with authentication. For example.
/ - public
/admin - uses authentication
Could you update the example.js with that? I don't really get how to stitch it together... :S
It was not clear to me that this authentication used the HTTP standard headers to perform a very basic login. I spent a bit of time trying to find how the login screen was setup on the backend as I was not aware that the browsers had a standard for doing this. Hence the screen was generated by the browser and not in the backend.
Maybe I will update the MD file. Clearly this basic authentication is persistent at the client and so not suitable for commercial use. In future the standard may be updated so that the authentication does not persist, but standards are a bit like government. Expect nothing and you will not be disappointed,
could you please update this module on npm ? (had the same bug that was already fixed)
thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.