Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Invalid redirect_uri with 'omniauth-facebook' gem

So I went to this guide that explains how to start with omniauth. When I got to the end of step 4 to test the application at localhost:3000/auth/facebook, I got this error:

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

I understand the problem is the URL in the Facebook developer center, but none of the solutions I read works for me...

(I know that there are some questions before regarding this issue, but I'm new to Ruby on Rails and need an explanation for dummies.)

like image 242
user1306566 Avatar asked Apr 01 '12 17:04

user1306566


2 Answers

Defining these settings at the Facebook developer center solved this for me:

  • App Domain: (blank)

  • Site URL: http://localhost:3000

like image 110
Steve Bourne Avatar answered Sep 18 '22 23:09

Steve Bourne


Check the website option and set the site URL to http://localhost:3000/.

like image 35
Chris Avatar answered Sep 17 '22 23:09

Chris