Lately I had some problems with invalid callback url I was getting on my production server (shared host). Omniauth in response included port used internally by nginx (eg. this could be the case eg. when you have varnish in front of you web server) – after browsing the source code of omniauth gem I have found out that you can easily fix if without even touching webserver configuration (and I didn’t had access to it anyway :P).
So take a look at
strategy.rb, you have there method
full_host and as you see below in the first place it tries to fetch it’s value from user’s configuration.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
So to fix it you can add to your production environment something like this:
Yep – that’s all :).