这是我遵循的教程。向下滚动到Google open-id集成:
https://github.com/plataformatec/devise/wiki/OmniAuth:-Overview
在服务器上,点击使用google链接登录后,我收到以下拒绝消息:
WARNING: making https request to https://www.google.com/accounts/o8/id without verifying server certificate; no CA path was specified.
processing by users omniauthcallbackscontroller failure as html
编辑以下两行修复了CA路径警告但没有做任何事情来解决故障,因为html问题或让我前进
require "openid/fetchers"
OpenID.fetcher.ca_file = "/etc/ssl/certs/ca-certificates.crt"
然后将我重新路由到users / sign_in。
我的设计配置行如下所示:
config.omniauth :open_id, :store => OpenID::Store::Filesystem.new('/tmp'), :name => 'google', :identifier => 'https://www.google.com/acounts/o8/id', :require => 'omniauth-openid'
我的研究告诉我,我可能正在使用openID服务器但是我被拒绝了。无论如何从某种拒绝通知中获取更多信息?我的要求有什么问题?
我想到的一件事是开放ID的凭证,但我没有在教程中看到我应该获得的任何地方或输入任何凭据。
答案 0 :(得分:0)
尝试指定ca_path:
config.omniauth :open_id, :store => OpenID::Store::Filesystem.new('/tmp'),
:name => 'google',
:identifier => 'https://www.google.com/acounts/o8/id',
:require => 'omniauth-openid',
:client_options => {:ssl => {:ca_path => '/etc/ssl/certs'}}
看看它是否有效。