Search code examples
ruby-on-railsfacebookdeviseomniauth-facebook

Omniauth facebook how to set up properly configs in facebook apps dashboard?


I know this question has been asked many times but none of them helped me.

I'm trying to make a login with facebook to my website, but getting an error:

{"error":{"message":"Error validating verification code. Please make sure your redirect_uri is identical to the one you used in the OAuth dialog request","type":"OAuthException","code":100,"fbtrace_id":"DV9+XV2aZn5"}}

I have the following configs in my facebook apps dashboard:

enter image description here enter image description here

Seems I'm missing something with setting up URLs but can't figure out what.

Update

app/models/customer.rb

devise :omniauthable, omniauth_providers: [:facebook]

Solution

  • Seems to be a bug in omniauth-facebook gem
    Refer on this thread for this bug https://github.com/mkdynamic/omniauth-facebook/issues/220 Also here is the fix https://github.com/gioblu/omniauth-facebook/commit/eff97bfae32f72821cbccf0b48b78351e41eb585