我已经使用omniauth gem实现了twitter和facebook身份验证,但是当我尝试使用openID或google进行身份验证时,我得到:没有路由匹配[GET]“/auth/google_apps”或没有路由匹配[GET]“/auth/open_id”错误
我的 omniauth.rb 文件是:
require 'openid/store/filesystem'
Rails.application.config.middleware.use OmniAuth::Builder do
provider :openid, :store => OpenID::Store::Filesystem.new('/tmp'), :name => 'openid'
provider :openid, :store => OpenID::Store::Filesystem.new('/tmp'), :name => 'google', :identifier => 'https://www.google.com/accounts/o8/id'
我的 routes.rb 是这样的:
match '/auth/:provider/callback', to: 'authentications#create'
我的 Gemfile 是这样的:
#for user authentication
gem 'devise'
gem 'omniauth'
gem 'omniauth-twitter'
gem 'omniauth-facebook'
gem 'omniauth-openid'
gem 'omniauth-google-oauth2'
我必须在我的代码中添加任何其他内容才能运行 OpenID 和 google 身份验证?谢谢