Twitter Login Troubleshooting


(joeygufreda) #1

After following the directions in the howto section, Twitter authentication still isn’t working. The twitter_consumer_key and twitter_consumer_secret have been entered into the settings, http://forum.example.com/auth/twitter/callback is set as the Callback URL in Twitter, and Sign in with Twitter is enabled.

Attempting to login with Twitter opens a pop-up window, but no content loads. Are there any obvious steps to miss, or anywhere to see what isn’t happening correctly?


(Bobthedino) #2

I’m having the exact same problem. For info, the URL in the blank pop-up window is http://forum.example.com/auth/twitter/ - i.e. without the word callback.


(joeygufreda) #3

That is what I’m seeing too. Below is the window that spawns, and it never gets any further than this.

Are there logs that would show which parts aren’t properly connected?


(Travis) #4

I’m having the same issue. Just completely a brand new fresh install of Discourse via Docker.


(veblock) #5

Same issue here. Blank page, /auth/twitter returning 500 error. Started happening 3-4 upgrades back.


(joeygufreda) #6

Does anyone have this working? Mine is a fresh Docker install as well (0.9.8.11), and up to date as of last night.


(Lgkh) #7

Same issue with 0.9.8.11.

Other Services:

Google: Sorry, there was an error authorizing your Google account. Perhaps you did not approve authorization?
Yahoo: Sorry, there was an error authorizing your Yahoo account. Perhaps you did not approve authorization?


(Jeff Atwood) #8

Looks OK to me:

Created account:

Validated email (Twitter does not provide email, which is super super annoying)

Then I logged out and logged back in as that user just fine.

This is on latest.


(joeygufreda) #9

Interesting. Does port 443 need to be open to Discourse? Though my install isn’t using https, I’m guessing Twitter authentication does.


(Jeff Atwood) #10

Not sure – that site is using the standard default Docker install on Digital Ocean from the install guide. I didn’t do anything other than configuring Twitter settings in /admin/settings.


(Juan Manuel Formoso) #11

It works for me without having port 443 open. I installed it using docker in my own box (not on Digital Ocean)


(Bobthedino) #12

Hmm… I wonder if there are any settings on the Twitter side that are required to make this work?


(joeygufreda) #13

It isn’t on Twitter’s side, assuming your settings are correct. I just migrated my install from a test VM at home to Digital Ocean, and it now authentication works just fine. It looks like it might be a network problem.


(Sam Saffron) #14

I wonder if a lot of the issue here was that SiteSettings were not being propergated properly (prior to today’s fixes)

Can you try resetting your container. Easiest way, reboot your machine or ./launcher restart app


(joeygufreda) #15

I can’t unfortunately because the environment that wasn’t working is gone (migrated to Digital Ocean), but maybe @l_g_k_h, @Vocino, or @bobthedino can. The issue definitely persisted through reboots before the most recent fixes, not sure about after.


(Lgkh) #16

@joeygufreda @sam @codinghorror , destroyed and rebootstraped to 0.9.9. Issue went away. Also hosted on DIgitalOcean.

At that time Facebook auth was working. Nothing in log too even it is a 500 error.


(Bobthedino) #17

Well the first thing I discovered is that ./launcher restart app does not work, because restart is not one of the commands that the launcher script accepts - yes, it’s printed out in the usage, but there’s no case to handle restart in the script!

Anyway I then tried stop then start, and the Twitter login problem remained. I was already on 0.9.9, incidentally, I upgraded via the Docker web interface a couple of days ago, and I am running on Digital Ocean.

So then I tried destroy and bootstrap, and still the problem remains. I might try setting up a fresh install on a different server, and see how that goes.

Just for info, I have the Facebook login working fine. Also I can’t seem to use ./launcher ssh app to get into the container - I just get the following and then nothing:

root:/var/docker# ./launcher ssh app
Enter passphrase for key '/root/.ssh/id_rsa': 
PTY allocation request failed on channel 0
Welcome to Ubuntu 12.10 (GNU/Linux 3.8.0-29-generic x86_64)

 * Documentation:  https://help.ubuntu.com/
stdin: is not a tty

(Sam Saffron) #18

there certainly is, git pull to get latest.


(Bobthedino) #19

Ah OK, thanks - will do. Am still learning about all this stuff, sorry!


(Bobthedino) #20

OK, so having done a git pull in /var/docker, doing a ./launcher restart app still did not help with the Twitter login problem.

I then tried a destroy and bootstrap, but the bootstrap now fails with:

/pups/lib/pups/exec_command.rb:85:in `spawn': /root/upgrade_postgres failed with return #<Process::Status: pid 70 exit 1> (RuntimeError)
	from /pups/lib/pups/exec_command.rb:55:in `block in run'
	from /pups/lib/pups/exec_command.rb:53:in `each'
	from /pups/lib/pups/exec_command.rb:53:in `run'
	from /pups/lib/pups/command.rb:5:in `run'
	from /pups/lib/pups/config.rb:85:in `block (2 levels) in run_commands'
	from /pups/lib/pups/config.rb:76:in `each'
	from /pups/lib/pups/config.rb:76:in `block in run_commands'
	from /pups/lib/pups/config.rb:75:in `each'
	from /pups/lib/pups/config.rb:75:in `run_commands'
	from /pups/lib/pups/config.rb:71:in `run'
	from /pups/lib/pups/cli.rb:31:in `run'
	from /pups/bin/pups:8:in `<main>'
f6c628391f888e86edaee53517269ac388c759e69c492911e65d190f85d74dfc
FAILED TO BOOTSTRAP