我在应用程序中遇到了一个奇怪的错误。当我尝试使用 facebook 登录时会发生这种情况,而不是在 facebook 上拒绝应用程序要求的权限。
这是堆栈跟踪:
Started GET "/users/auth/facebook/callback?error=access_denied&error_code=200&error_description=Permissions+error&error_reason=user_denied&state=426366bb3ac72ca4ad2b8b3fea5d5c7f628d6463b5df64a6" for 95.51.182.141 at 2013-09-05 20:55:24 +0000
(facebook) Callback phase initiated.
(facebook) Authentication failure! invalid_credentials: OmniAuth::Strategies::OAuth2::CallbackError, OmniAuth::Strategies::OAuth2::CallbackError
Processing by Devise::OmniauthCallbacksController#failure as HTML
Parameters: {"error"=>"access_denied", "error_code"=>"200", "error_description"=>"Permissions error", "error_reason"=>"user_denied", "state"=>"426366bb3ac72ca4ad2b8b3fea5d5c7f628d6463b5df64a6"}
Completed 500 Internal Server Error in 2ms
NoMethodError (undefined method `to_sym' for nil:NilClass):
vendor/bundle/ruby/1.9.1/gems/mobile-fu-1.1.1/lib/mobile-fu.rb:165:in `mobile_exempt?'
vendor/bundle/ruby/1.9.1/gems/mobile-fu-1.1.1/lib/mobile-fu.rb:114:in `set_mobile_format'
vendor/bundle/ruby/1.9.1/gems/mobile-fu-1.1.1/lib/mobile-fu.rb:89:in `set_request_format'
(...)
有趣的是,当我查看 mobile-fu 代码时,我看到 nil (显然不应该)是params[:action]
.