i’m trying to authenticate with facebook i have a sinatra app working correctly with twitter.
app.rb
use OmniAuth::Builder do
provider :twitter, 'xxx', 'yyy'
provider :facebook, 'xxx', 'yyy', :redirect_uri => 'http://localhost:9393/auth/facebook'
end
i’m referencing the facebook link in my view like,
%a{:href=>"/auth/twitter"} Sign In To Twitter
%a{:href=>"/auth/facebook"} Sign In To Facebook
and i’m being returned
which looks like
{
"error": {
"message": "Invalid redirect_uri: Given URL is not allowed by the Application configuration.",
"type": "OAuthException",
"code": 191
}
}
as far as I can tell, my settings look correct. many posts exist about this issue being tied to facebook and the apps registered url.
on facebook, this app is registered as
Site URL
http://localhost:9393/
Site Domain
http://localhost:9393/
Thanks.
i actually found the answer,
App Domains: localhost/and
Website with Facebook Login: http://localhost:9393/?the
/?on the localhost (website w fb login) is the important detail