我正在使用Devise和OmniAuth并且已经遵循了本教程:https://github.com/plataformatec/devise/wiki/OmniAuth:-Overview
一切正常,但只要用户点击,我的应用就会向Facebook发送两次请求:
<%= link_to "Sign in with Facebook", user_omniauth_authorize_path(:facebook) %>
我甚至没有omniauth.rb文件。
以下是我在控制台中看到的内容:
Started GET "/users/auth/facebook" for 127.0.0.1 at 2014-08-19 21:04:03 -0400 I, [2014-08-19T21:04:03.832699 #54281] INFO -- omniauth: (facebook) Request phase initiated.
Started GET "/users/auth/facebook" for 127.0.0.1 at 2014-08-19 21:04:03 -0400 I, [2014-08-19T21:04:03.854510 #54281] INFO -- omniauth: (facebook) Request phase initiated.
我做错了什么吗?如何防止发送两个请求?