
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
bones-passport
Advanced tools
Provides a pluggable authentication middleware server that uses the Passport library.
Supports dummy, twitter, oauth1 and oauth2 authentication strategies.
Mount any of the supported authentication strategies in your bones middleware server :
// filename: servers/Middleware.bones
var express = require('express');
servers.Middleware.augment({
initialize: function(parent, app) {
parent.call(this, app);
// session support is required, and is the responsibility
// of your application to enable.
this.use(express.session({ secret: 'secret' }));
this.use(new servers.PassportTwitter(app));
}
});
Configuration settings for the authentication strategies are stored in a
passport.json
file in the root of your application, for example:
{
"twitter" : {
"callbackURL": "http://mydomain:3000/auth/twitter/callback",
"consumerKey": "get from dev.twitter.com",
"consumerSecret": "get from div.twitter.com"
}
}
You can initiate login by directing your user to /auth/twitter
in this case,
although each authentication strategy has it's own url, such as /auth/dummy
and /auth/oauth2
for those relevant strategies.
Bones-passport has a basic User model that will be instanced into req.user
by passport when a user has been logged in, and you can test for a logged in
user with req.isAuthenticated
.
FAQs
Integrate the passport authentication framework into Bones.
The npm package bones-passport receives a total of 1 weekly downloads. As such, bones-passport popularity was classified as not popular.
We found that bones-passport 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
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.