Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Got an error while authenticating #1

Open
gbirke opened this issue Feb 21, 2018 · 4 comments
Open

Got an error while authenticating #1

gbirke opened this issue Feb 21, 2018 · 4 comments

Comments

@gbirke
Copy link

gbirke commented Feb 21, 2018

I've followed the steps in the readme: installed module, added config and set my API key and secret. When trying to authenticate with Twitter, I get the following error message:

Error: Desktop applications only support the oauth_callback value 'oob'
    at Strategy.parseErrorResponse (/Users/gbirke/.node-red/node_modules/passport-twitter/lib/strategy.js:206:12)
    at Strategy.OAuthStrategy._createOAuthError (/Users/gbirke/.node-red/node_modules/passport-oauth1/lib/strategy.js:393:16)
    at /Users/gbirke/.node-red/node_modules/passport-oauth1/lib/strategy.js:244:41
    at /Users/gbirke/.node-red/node_modules/oauth/lib/oauth.js:543:17
    at passBackControl (/Users/gbirke/.node-red/node_modules/oauth/lib/oauth.js:397:13)
    at IncomingMessage.<anonymous> (/Users/gbirke/.node-red/node_modules/oauth/lib/oauth.js:409:9)
    at emitNone (events.js:111:20)
    at IncomingMessage.emit (events.js:208:7)
    at endReadableNT (_stream_readable.js:1056:12)
    at _combinedTickCallback (internal/process/next_tick.js:138:11)
@knolleary
Copy link
Member

Hi - this will be related to one of the config options in your Twitter Application on https://apps.twitter.com/

You have it configured as a Desktop application. I can't remember the right option and am not currently able to go find out. See if you have tinker with the options to find the right bit to set. If you do manage to track it down before I'm able to look properly, please let me know and we can update the readme to make it clear.

gbirke added a commit to gbirke/node-red-auth-twitter that referenced this issue Feb 23, 2018
@anwarbashir
Copy link

anwarbashir commented Jul 8, 2018

Hi, I have installed Node-RED on Windows and installed node-red-auth-twitter. I have added the adminAuth code in the settings.js file after creating a twitter app and obtaining key/secret. But when I run npm start I get an error. I have tried various syntax combinations to try and overcome the error, can you shed any light on what I am doing wrong?

`C:\Users\anwar\node-red>npm start

[email protected] start C:\Users\anwar\node-red
node red.js

Error loading settings file: \Users\anwar.node-red\settings.js
C:\Users\anwar.node-red\settings.js:215
functionGlobalContext: {
^^^^^^^^^^^^^^^^^^^^^

SyntaxError: Unexpected identifier
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:616:28)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object. (C:\Users\anwar\node-red\red.js:115:20)

C:\Users\anwar\node-red>`

I am not doing anything to functionGlobalContext, just pasted the code exactly as shown...

I placed to code directly below the //Securing Node-RED comments

@knolleary
Copy link
Member

knolleary commented Jul 8, 2018

Make sure there is a comma separating adminAuth and functionGlobalContext

(And please don't post questions to unrelated issues. Use the node-red forum for general help.. link on the website.)

@anwarbashir
Copy link

Hi, Apologies for posting here instead of node-red forum, I placed a comma after the final bracket, and now the program runs - much obliged :)

Kind Regards
Anwar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants