I am using Omniauth and forcing /auth/facebook to display in a popup (with JS). [Instead of a new window - which is much less user friendly]
The problem is: Omniauth
At where you set your Facebook ID and secret key, add one more extra option as:
:display => "popup"