Omniauth-facebook keeps reporting invalid_credentials

后端 未结 7 1760
野性不改
野性不改 2020-12-05 07:13

I am trying to implement omniauth-facebook as described in Railscast #360 and have run into quite a roadblock. When I click on the signin link, I get the desired popup aski

7条回答
  •  醉话见心
    2020-12-05 07:27

    you may want to override OmniauthCallbacksController, and add this to logging:

    class OmniauthCallbacksController < Devise::OmniauthCallbacksController
      def failure_message
        exception = env["omniauth.error"]
        #add login here:
        Rails.logger.info "exception: #{exception.inspect}"
        error   = exception.error_reason if exception.respond_to?(:error_reason)
        error ||= exception.error        if exception.respond_to?(:error)
        error ||= env["omniauth.error.type"].to_s
        error.to_s.humanize if error
      end
    
      #other code ...
    end
    

    after ive added mine, i found "invalid ip..." issue,

提交回复
热议问题