Devise, OmniAuth & Facebook: “Not found. Authentication passthru.”

前端 未结 9 1140
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-16 16:59

Trying to follow along with https://github.com/plataformatec/devise/wiki/OmniAuth:-Overview and I\'m stumped.

I\'ve got config.omniauth :facebook, ENV[\'FB_AP

9条回答
  •  囚心锁ツ
    2020-12-16 17:16

    It could be happening because the configuration with Devise and Omniauth should be made ONLY in config/initializers/devise.rb. Do not create the onfig/initializers/omniauth.rb file.

    Remember that config.omniauth adds omniauth provider middleware to your application. This means you should not add this provider middleware again in config/initializers/omniauth.rb as they'll clash with each other and result in always-failing authentication.

    https://github.com/heartcombo/devise/wiki/OmniAuth%3A-Overview#before-you-start

提交回复
热议问题