mirror of
https://github.com/node-red/node-red-nodes.git
synced 2023-10-10 13:36:58 +02:00
Twitter node: remove auth requirement on oauth callback routes
Fixes #253
This commit is contained in:
parent
a63df3c41d
commit
9be6545739
@ -34,7 +34,7 @@
|
||||
}
|
||||
var callback = encodeURIComponent(location.protocol+"//"+location.hostname+":"+location.port+pathname+"twitter-credentials/"+twitterConfigNodeId+"/auth/callback");
|
||||
$("#node-config-dialog-ok").button("disable");
|
||||
$("#node-config-twitter-row").html('<div style="text-align: center; margin-top: 20px; "><a class="btn" id="node-config-twitter-start" href="twitter-credentials/'+twitterConfigNodeId+'/auth?callback='+callback+'" target="_blank">'+clickhere+'</a></div>');
|
||||
$("#node-config-twitter-row").html('<div style="text-align: center; margin-top: 20px; "><a class="editor-button" id="node-config-twitter-start" href="twitter-credentials/'+twitterConfigNodeId+'/auth?callback='+callback+'" target="_blank">'+clickhere+'</a></div>');
|
||||
$("#node-config-twitter-start").click(function() {
|
||||
twitterConfigNodeIntervalId = window.setTimeout(pollTwitterCredentials,2000);
|
||||
});
|
||||
|
@ -459,7 +459,7 @@ module.exports = function(RED) {
|
||||
"HMAC-SHA1"
|
||||
);
|
||||
|
||||
RED.httpAdmin.get('/twitter-credentials/:id/auth', RED.auth.needsPermission('twitter.read'), function(req, res) {
|
||||
RED.httpAdmin.get('/twitter-credentials/:id/auth', function(req, res) {
|
||||
var credentials = {};
|
||||
oa.getOAuthRequestToken({
|
||||
oauth_callback: req.query.callback
|
||||
@ -478,7 +478,7 @@ module.exports = function(RED) {
|
||||
});
|
||||
});
|
||||
|
||||
RED.httpAdmin.get('/twitter-credentials/:id/auth/callback', RED.auth.needsPermission('twitter.read'), function(req, res, next) {
|
||||
RED.httpAdmin.get('/twitter-credentials/:id/auth/callback', function(req, res, next) {
|
||||
var credentials = RED.nodes.getCredentials(req.params.id);
|
||||
credentials.oauth_verifier = req.query.oauth_verifier;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name" : "node-red-node-twitter",
|
||||
"version" : "0.1.9",
|
||||
"version" : "0.1.10",
|
||||
"description" : "A Node-RED node to talk to Twitter",
|
||||
"dependencies" : {
|
||||
"twitter-ng": "0.6.2",
|
||||
|
Loading…
Reference in New Issue
Block a user