Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
@salesflare/bell
Advanced tools
Readme
Third-party authentication plugin for hapi.
Lead Maintainer: Lois Desplat
bell ships with built-in support for authentication using Facebook
, GitHub
, Google
, Google Plus
, Instagram
, LinkedIn
, Slack
, Stripe
, Twitter
, Yahoo
, Foursquare
, VK
, ArcGIS Online
, Windows Live
, Nest
, Phabricator
, BitBucket
, Dropbox
, Reddit
, Tumblr
, Twitch
, Mixer
, Salesforce
, Pinterest
, Discord
, DigitalOcean
, AzureAD
, trakt.tv
and Okta
. It also supports any compliant OAuth 1.0a
and OAuth 2.0
based login services with a simple configuration object.
NOTE: Bell 8.x.y uses the Hapi v16 APIs and will not work with Hapi v17. As of writing, Bell 8.x.y is the latest version, and an effort to make Bell support Hapi v17 is underway.
Social Login with Twitter using hapi.js
Twitter:
var Hapi = require('hapi');
var server = new Hapi.Server();
server.connection({ port: 8000 });
// Register bell with the server
server.register(require('bell'), function (err) {
// Declare an authentication strategy using the bell scheme
// with the name of the provider, cookie encryption password,
// and the OAuth client credentials.
server.auth.strategy('twitter', 'bell', {
provider: 'twitter',
password: 'cookie_encryption_password_secure',
clientId: 'my_twitter_client_id',
clientSecret: 'my_twitter_client_secret',
isSecure: false // Terrible idea but required if not using HTTPS especially if developing locally
});
// Use the 'twitter' authentication strategy to protect the
// endpoint handling the incoming authentication credentials.
// This endpoints usually looks up the third party account in
// the database and sets some application state (cookie) with
// the local application account information.
server.route({
method: ['GET', 'POST'], // Must handle both GET and POST
path: '/login', // The callback endpoint registered with the provider
config: {
auth: 'twitter',
handler: function (request, reply) {
if (!request.auth.isAuthenticated) {
return reply('Authentication failed due to: ' + request.auth.error.message);
}
// Perform any account lookup or registration, setup local session,
// and redirect to the application. The third-party credentials are
// stored in request.auth.credentials. Any query parameters from
// the initial request are passed back via request.auth.credentials.query.
return reply.redirect('/home');
}
}
});
server.start();
});
FAQs
Third-party login plugin for hapi
The npm package @salesflare/bell receives a total of 1 weekly downloads. As such, @salesflare/bell popularity was classified as not popular.
We found that @salesflare/bell demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.