
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
@withyouwithme/promisify-auth0
Advanced tools
Make Auth0-js work with promises instead of callbacks.
Promisifying wrapper around the Client Side Javascript toolkit for Auth0 API
From npm
npm i --save promisify-auth0
The package is mirroring the original auth0.js API. The only difference is that instead of NodeJS callback function style, promisify-auth0
allows you to get Promise<T>
instead which help avoid callback hell and play nicely with async/await
.
You will still need to create an original Auth0 objects and inject them into the corresponding wrapping types, something like this:
import { Authentication as NativeAuthentication } from 'auth0-js';
import { Authentication } from 'promisify-auth0';
const nativeAuthentication: NativeAuthentication = ...;
const authentication = new Authentication(nativeAuthentication);
const options = { realm: '...', audience: '...', username: '...', password: '...', scope: '...' };
authentication.login(options)
.then(loginResult => {
// ...
})
.catch(caughtError => {
// ...
});
The last piece of code could be rewritten in a more imperative style while maintaining the asyncronous execution model.
try {
const loginResult = await authentication.login(options);
// ...
} catch (caughtError) {
// ...
}
This code is distributed under MIT license.
Please respect the Code of Conduct.
Feel free to contribute.
FAQs
Make Auth0-js work with promises instead of callbacks.
The npm package @withyouwithme/promisify-auth0 receives a total of 1 weekly downloads. As such, @withyouwithme/promisify-auth0 popularity was classified as not popular.
We found that @withyouwithme/promisify-auth0 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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.