Security News
UK Officials Consider Banning Ransomware Payments from Public Entities
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.
passwordless-cache-manager
Advanced tools
A token store for Passwordless, a node.js module for express that allows website authentication without password using verification through email or other means.
This store implementation uses node-cache-manager, which supports multiple storage engines.
Tokens are stored in memory and are hashed and salted using bcryptjs.
Most of the project scaffolding is lifted from passwordless-memorystore, with modifications specific to using node-cache-manager
.
First, install the module:
$ npm install cache-manager passwordless-cache-manager --save
Afterwards, follow the guide for Passwordless. A typical implementation may look like this:
var passwordless = require('passwordless');
var cacheManager = require('cache-manager');
var CacheManagerStore = require('passwordless-cache-manager');
// Using the built-in memory store as an example. Swap this out with the specific cache-manager storage engine you need
var memoryStore = require('cache-manager/lib/stores/memory');
passwordless.init(new CacheManagerStore(cacheManager.caching({
store: memoryStore
})));
passwordless.addDelivery(
function(tokenToSend, uidToSend, recipient, callback) {
// Send out a token
});
app.use(passwordless.sessionSupport());
app.use(passwordless.acceptToken());
var cacheManager = require('cache-manager');
var CacheManagerStore = require('passwordless-cache-manager');
new CacheManagerStore(cacheManager.caching({
store: <cache-manager store>,
// store-related options
}));
As the tokens are equivalent to passwords (even though they do have the security advantage of only being valid for a limited time) they have to be protected in the same way. passwordless-cache-manager uses bcryptjs with automatically created random salts. To generate the salt 10 rounds are used.
$ npm test
1.0.0 (2016-07-13)
FAQs
Use node-cache-manager as a passwordless token store
The npm package passwordless-cache-manager receives a total of 1 weekly downloads. As such, passwordless-cache-manager popularity was classified as not popular.
We found that passwordless-cache-manager demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.
Security News
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.