Skip to content

Loading…

Facebook Invalid URI #257

Closed
mluton opened this Issue · 2 comments

2 participants

@mluton

Facebook really wants Site URL to end in a slash. Since omniauth is stripping the trailing slash from redirect_uri Facebook keeps returning a "Invalid redirect_uri: Given URL is not allowed by the Application configuration."

I was able to configure my Facebook application to have a Site URL without a trailing slash before but it seems like they've tightened up their controls in the last couple of months. Is there anyway to have omniauth not strip the trailing slash from redirect_uri?

@azolotov

I think that one thing you can do is to set
OmniAuth.config.full_host = YOUR_URL
in your config/initializers/omniauth.rb without the trailing slash, if you always redirect to the same URL after authentication.

@mluton

Ah. Very cool. I think the gem we have installed is a bit behind the current source code but it's nice to know about this option. Thanks!

@mluton mluton closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.