![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
dropbox-authenticator
Advanced tools
Simple authentication helper for Dropbox.
$ npm install dropbox-authenticator
The authenticator is a tiny object that exposes two single functions.
The initiate
function asks Dropbox for a request token and generates a URL
that you should send your user to. You are then responsible for providing
a calback URL that Dropbox can send the user to.
Once the user comes back to you, you complete the authorization by calling
complete
.
The complete
function takes the response stream from an HTTP server and a
call back function. Once authorization is complete this function is called
with the OAuth credentials. It's up to you to store these.
Quick 'n dirty example showing how to use this thing:
var Authenticator = require('dropbox-authenticator');
var http = require('http');
var auth = Authenticator(YOUR_APP_ID, YOUR_APP_SECRET);
// Handle authorizations
http.createServer(function (req, res) {
if (req.url === '/') {
auth.initiate('http://mysite.com/authorized', function (err, url) {
res.write('<a href="' + url + '">Authorize!</a>');
res.end();
});
}
else {
auth.complete(res, function (err, credentials) {
// Save credentials or something here
console.log(credentials);
});
}
});
Note that this fails if many users access the server simultaneously. This is
because Authenticator
needs to store some tokens internally between each
step. I'm thinking about a fix for this. In the mean time I recommend doing
some kind of session thing and tying one instance of Authenticator
to each
session.
ISC
FAQs
Easily obtain OAuth credentials for the Dropbox API.
The npm package dropbox-authenticator receives a total of 1 weekly downloads. As such, dropbox-authenticator popularity was classified as not popular.
We found that dropbox-authenticator 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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.