julianlam / nodebb-plugin-sso-twitter

NodeBB Plugin that allows users to login/register via their Twitter account.
BSD 2-Clause "Simplified" License
9 stars 8 forks source link

Twitter SSO fails immediately #28

Closed venil7 closed 6 years ago

venil7 commented 6 years ago

with the following message

Internal Error.
Oops! Looks like something went wrong!

/auth/twitter

Callback URL not approved for this client application. Approved callback URLs can be adjusted in your application settings
julianlam commented 6 years ago

What is your callback URL as set in the Twitter app settings?

wellenreiter01 commented 6 years ago

I get the same error.

My callback url in the twitter app settings are:

http://forum.feathercoin.com/auth/twitter/callback https://forum.feathercoin.com/auth/twitter/callback

I have configured two in Twitter app

Additional information from nodebb log (web logging enabled):

2018-07-15T07:12:59.453Z [31043] - error: /auth/twitter
 Error: Could not authenticate you.
    at Strategy.parseErrorResponse (/home/forum/nodebb/node_modules/passport-twitter/lib/strategy.js:202:14)
    at Strategy.OAuthStrategy._createOAuthError (/home/forum/nodebb/node_modules/passport-oauth1/lib/strategy.js:393:16)
    at /home/forum/nodebb/node_modules/passport-oauth1/lib/strategy.js:244:41
    at /home/forum/nodebb/node_modules/oauth/lib/oauth.js:543:17
    at passBackControl (/home/forum/nodebb/node_modules/oauth/lib/oauth.js:397:13)
    at IncomingMessage.<anonymous> (/home/forum/nodebb/node_modules/oauth/lib/oauth.js:409:9)
    at emitNone (events.js:91:20)
    at IncomingMessage.emit (events.js:188:7)
    at endReadableNT (_stream_readable.js:975:12)
    at _combinedTickCallback (internal/process/next_tick.js:80:11)
    at process._tickDomainCallback (internal/process/next_tick.js:128:9)
 2a02:908:ea52:2900:a6db:30ff:fed0:6282 - - [15/Jul/2018:07:12:59 +0000] "GET /auth/twitter    HTTP/1.1" 500 - "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.87 Safari/537.36 OPR/54.0.2952.41"
2a02:908:ea52:2900:a6db:30ff:fed0:6282 - - [15/Jul/2018:07:13:00 +0000] "GET /assets/src/client/500.js?v=2jjpukk27pq HTTP/1.1" 200 0 "https://forum.feathercoin.com/auth/twitter" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.87 Safari/537.36 OPR/54.0.2952.41"
wellenreiter01 commented 6 years ago

this seems to be a duplicate to #17 I fixed this by configuring the app in twitter with read/write permissions and re-create the credentials in twitter. It seems , that the sso requests full RW access to twitter. It should request the 'login only' permission unless automatic tweets are enabled in nodebb