
Security News
Open Source Maintainers Demand Ability to Block Copilot-Generated Issues and PRs
Open source maintainers are urging GitHub to let them block Copilot from submitting AI-generated issues and pull requests to their repositories.
passport-anonym-uuid
Advanced tools
Anonymous authentication strategy for Passport that supply an uuid.
Passport strategy for anonymous authentication with a unique uuid for the anonymous user.
This module lets you provide anonymous authentication in your Node.js applications. By plugging into Passport, anonymous authentication can be easily and unobtrusively integrated into any application or framework that supports Connect-style middleware, including Express.
$ npm install passport-anonym-uuid
The anonymous authentication strategy passes authentication for a request,
with req.user
supplied with {uuid: "anonymous_<uuid>"}
.
passport.use(new AnonymIdStrategy());
If you pass a done
verify function to the strategy it will be supplied with req
and the generated uuid
.
With such verify callback, you can use this strategy the same way as passport-req. The strategy will not touch the user object returned by the callback.
Use passport.authenticate()
, specifying the 'anonymId'
strategy, to
pass authentication of a request. This is typically used alongside a strategy
that verifies credentials, as a fallback for routes that prefer authentication
but can also respond to unauthenticated requests.
For example, as route middleware in an Express application:
app.post('/hello',
passport.authenticate(['basic', 'anonymId'], { session: false }),
function(req, res) {
if (!req.user.uuid) {
res.json({ name: req.user.username });
} else {
res.json({ name: req.user.uuid });
}
});
For a complete, working example, refer to the login example.
$ npm install
$ npm test
This package is almost a copy of passport-anonymous made by Jared Hanson.
Copyright (c) 2017 Honoré Nintunze
FAQs
Anonymous authentication strategy for Passport that supply an uuid.
The npm package passport-anonym-uuid receives a total of 350 weekly downloads. As such, passport-anonym-uuid popularity was classified as not popular.
We found that passport-anonym-uuid demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Open source maintainers are urging GitHub to let them block Copilot from submitting AI-generated issues and pull requests to their repositories.
Research
Security News
Malicious Koishi plugin silently exfiltrates messages with hex strings to a hardcoded QQ account, exposing secrets in chatbots across platforms.
Research
Security News
Malicious PyPI checkers validate stolen emails against TikTok and Instagram APIs, enabling targeted account attacks and dark web credential sales.