4

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]
user2931706
  • 195
  • 1
  • 11

3 Answers3

3

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

Jude Calimbas
  • 2,764
  • 2
  • 27
  • 24
0

For devise omniauth your call back will have a url structure like:

http://localhost:3000/auth/facebook/callback

Instead of just the http://localhost:3000 that you are showing in your screenshot.

DustinFisher
  • 396
  • 2
  • 11
0

If you are using devise and facebook omniauth then Valid OAuth redirect URIs is:

http://localhost:3000/users/auth/facebook/callback

http://localhost:3000/auth/facebook/callback is used when devise is not used just omniauth is used.

my site is online but uri can be seen in image

SulmanWeb
  • 601
  • 6
  • 24