Authentication failure : Devise + OmniAuth + Twitter

筅森魡賤 提交于 2019-12-01 04:05:44

I found the issue. I have configured providers in both devise.rb and omniauth.rb. I simply removed omniauth.rb and it started working.

Try putting your twitter KEY code in an omniauth.rb file in your initilizers folder. Like this:

Rails.application.config.middleware.use OmniAuth::Builder do
  provider :twitter, 'KEY', 'SECRET'
end

per: https://github.com/intridea/omniauth The authentication with twitter, after all, comes through omniauth, not devise.

Good Luck! @thatdankent

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!