
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
dear is a npm package which standardizes requests to many known API's. It inherits endpoints used by the HelloJS project and makes them available within Node environments.
dear.init - Configure a web servicedear.api - Make HTTP requestsA typical use case might be to verify a users email address. If you have signed the user in the browser (via HelloJS for example) the client will have received an OAuth2 "access_token". This token can be used to make API requests for the data in the server. So, if the token can be delievered to the server, then the users credentials can be verified.
Below is an illustration of some ConnectJS/ExpressJS middleware which will store the users verified email address.
var dear = require('dear');
... // setup connectjs
app.get('register', function(){
var token = req.params.access_token;
var network = req.params.network;
dear( network )
.api('me', {
access_token: token
})
.then(function(response){
var email = response.email;
// do something with the verified email address
});
});
For example the request would look like HTTP /register?access_token=1212121&network=facebook
OAuth1 is supported by a number of services. These must be signed with a secret key to create a unique requests each and every time. Therefore for those we must register the secret before making any API requests.
dear.init({
yahoo : {
client_id : 'registered app id',
client_secret : 'ssssssshhhhh'
}
});
If HelloJS was not used to generate the access_token's for an OAuth1 service. Then a single 'access_token' needs to to be created. dear will correctly sign OAuth1 requests when the access_token presented has the format "oauth_token:oauth_token_secret@oauth_consumer_key".
For requests made by dear.api please refer to hello.api.
The specs of dear methods are defined in Travis CI.
This project inherits code from a clientside javascript project HelloJS. It is therefore neccessary to include hello in the global namespace. It is hoped that this will no longer be the case in future.
FAQs
oauth verification
The npm package dear receives a total of 2 weekly downloads. As such, dear popularity was classified as not popular.
We found that dear 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
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.