【发布时间】:2012-08-10 14:21:46
【问题描述】:
我正在尝试在 Ruby on Rails 中使用 Google Apps 执行 OmniAuth OpenID。我知道如果我指定 ":identifier => 'https://www.google.com/accounts/o8/site-xrds?hd=example.com'" 其中 example.com 它应该开箱即用是我的目标用户来自的域。
用户在访问 /auth/google 时可以毫无问题地被重定向到谷歌,并且这个 openid.identity 可以从谷歌返回:
... &openid.identity=http://example.com/openid?id=xxxxxxxxxxxxxxxxxxxxxxx ...
但是,我正在使用的 example.com 没有在http://example.com/ 设置正确的“rel='openid2.provider'” 标签,因此当omniauth-openid 尝试检查时发现失败再次与 Google 合作。
是否有一种快速而干净的方法来解决默认发现行为,以便我可以直接将https://www.google.com/a/example.com/o8/ud?be=o8 定义为服务器而不执行自动发现?
谢谢!
【问题讨论】:
标签: ruby-on-rails ruby-on-rails-3 openid omniauth google-openid