SoapSeller / omniauth-facebook-access-token

51 stars 68 forks source link

Error if client configures omniauth-facebook-access-token with a numeric app_id #2

Closed gmcnaughton closed 11 years ago

gmcnaughton commented 11 years ago

After setting up omniauth-facebook-access-token, I got this error:

ArgumentError - Access token doesn't belong to the client.:
  omniauth-facebook-access-token (0.1.1) lib/omniauth/strategies/facebook-access-token.rb:88:in `callback_phase'
  omniauth (1.1.4) lib/omniauth/strategy.rb:226:in `callback_call'
  ...

The problem was that I had provided a numeric app_id in my Devise initializer:

config.omniauth :facebook_access_token, 12345, "secret"

Changing the app_id from 12345 to the string "12345" fixed the problem. It looks like the check on facebook-access-token.rb ln 87 is failing trying to compare the numeric app id to a string.

Numeric works everywhere else -- it would be nice if the check allowed either!

SoapSeller commented 11 years ago

Good point - both ways should work now.