Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
cf-password-reset-token
Advanced tools
Generate and validate password reset tokens
npm install --save cf-password-reset-token
var passwordResetToken = require('cf-password-reset-token')
// Generate a token for an authable entity (i.e one that can authorize
// themself with the system – e.g. administrator, user, customer)
passwordResetToken.generate(authableEntity)
//-> { token: '...', expiry: '...'}
// Check that a password reset token is valid for a given authable entity
passwordResetToken.validate(authableEntity, token)
//-> true or false
authableEntity
must have the following properties: created
and password
, along
with an identity property that be configured with options.identityProperty
. This
defaults to 'emailAddress'
. options.expiry
can be used to configure how long the
token is valid for. The default is 1 hour.
authableEntity
is the entity that token should be validated against. This function
will return true
if both of the following conditions are met:
token.token
is a valid tokentoken.expiry
is not in the pastauthableEntity
are the same as when the token was created:
created
, password
and its identityProperty
Built by developers at Clock.
Licensed under the New BSD License
FAQs
Generate and validate password reset tokens
We found that cf-password-reset-token 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
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.