2

I have set up an rails application that uses Twitter for single sign-on.

In my twitter configurations, my call back looks like the following: https://somesite.com/users/auth/twitter

But the redirect code from https://api.twitter.com/oauth/authenticate?oauth_token=someoauthtoken has the following code in the html:

<meta http-equiv="refresh" content="0;url=https://somesite:80/users/auth/twitter/callback?oauth_token=someoauthtoken&oauth_verifier=someoauthverifier”>

How do I force Twitter Single Sign-On to use https on port 443?

I tried changing the callback setting in my twitter account to https://somesite.com:443/users/auth/twitter but it still uses port 80 on the redirect.

Any help would be greatly appreciated.

Update

Does anyone have a Ruby on Rails application using https with a twitter callback? Are you not suppose to use https if you are using twitter for single sign on?

0

So for anyone going through this problem, here is what solve the problem form me.

I added some middleware that just changes the server port to 443

env['SERVER_PORT'] = '443' unless env['SERVER_PORT'] == '443'

Somewhere on the web server I am using, env['SERVER_PORT'] was set to 80. Twitter was using this value on the callback.

There is probably a web server setting that can be changed, but I do not have access to make that change, so this will have to do.

Hope this helps someone.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.