我已經實現與omniauth寶石Twitter和Facebook的身份驗證來驗證,但是當我嘗試使用OpenID認證或谷歌,我得到:沒有路由匹配[GET] 「/認證/ GOOGLE_APPS」 或無路由匹配[GET] 「/認證/ open_id」 錯誤沒有路由匹配[GET]「/認證/ GOOGLE_APPS」當我嘗試用omniauth - 谷歌 - 的oauth2寶石
我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和谷歌的認證? 謝謝