Facebook app - login through omniauth - OAuthException 191

user984621 picture user984621 · Mar 30, 2012 · Viewed 18.7k times · Source

I am facing with the problem:

  "error": {
      "message": "Invalid redirect_uri: Given URL is not allowed by the Application configuration.",
      "type": "OAuthException",
      "code": 191
   }

I set up in my app the needed keys and tokens, in the Facebook's dev center I set up Site URL: to http://127.0.0.1:3001 and I am getting the error above. Also I tried to set up App Namespace: to http://127.0.0.1:3001, but I am getting error about bad address format... When I tried to fill out he App Domain: and set there my localhost, again the error for the bad format...

What is the correct configuration the fabebook app with localhost?

Answer

Abe Petrillo picture Abe Petrillo · Mar 30, 2012

You need to use urls, what I would do add this to your hosts:

127.0.0.1 dev-machine
127.0.0.1 dev-machine.com

Then in the facebook settings use

dev-machine.com as your App Domain

dev-machine.com:3001 as your Site URL