
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
oauth2-refresh-token
Advanced tools
Keeps oauth2 auth token refreshed, handles refresh token management.
Makes managing oauth2 access and refresh tokens easy. Call refresh() to refresh the access token (and store the latest refresh token.)
Call getAccessToken() to get the latest access token. It will not auto-refresh if the access token has expired... You need to do this.
Usage:
var refreshToken = require('oauth2-token-refresh')('postgres://somedbserver/somedb', credentials, 'initial refresh token');
refreshToken.refresh(); //returns a promise
refreshToken.getAccessToken().then(function(result) {
console.log(result);
});
credentials are passed through to simple-oath2 and take the form:
// Set the configuration settings
const credentials = {
client: {
id: '<client-id>',
secret: '<client-secret>'
},
auth: {
tokenHost: 'https://api.oauth.com'
}
}
docker-compose run psql psql -h postgres -c 'create database "refresh-token-test"' -U postgres
docker-compose run node npm test
FAQs
Keeps oauth2 auth token refreshed, handles refresh token management.
The npm package oauth2-refresh-token receives a total of 18 weekly downloads. As such, oauth2-refresh-token popularity was classified as not popular.
We found that oauth2-refresh-token demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 7 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.