什么是正确的配置线,以获得设计,omniauth和谷歌工作? [英] What's the correct configuration line to get devise, omniauth and google working?
问题描述
我已经查看了文档,我无法弄清楚我正在使用的具体行,以便设计+ omniauth + p>这个策略文件表明有一个简单的方法,但是找不到一个例子。
https://github.com/intridea/omniauth/blob/master/oa-oauth/lib/ omniauth / strategies / google.rb
目前我在devise.rb初始化程序文件中使用下面的行。
config.omniauth:google,GOOGLE_APP_ID,GOOGLE_SECRET_KEY
但我很确定它是不完整的。
此外,我很难找到我应该注册的应用程序ID和秘密钥匙。
提前感谢。
Graeme
最后使用的行是...
config.omniauth:google,GOOGLE_APP_ID,GOOGLE_SECRET,:scope => http://www.google.com/m8/feeds http://picasaweb.google.com/data/
事实证明,我缺少访问Picasa所需的范围,这是导致我问题的原因。
I've looked through the documentation and I can't figure out the specific line I'm meant to use to get devise + omniauth + google working together nicely.
This strategy file suggests there's an easy way of doing it but I can't find an example.
https://github.com/intridea/omniauth/blob/master/oa-oauth/lib/omniauth/strategies/google.rb
At the moment I'm using the line below in the devise.rb initializer file.
config.omniauth :google, GOOGLE_APP_ID, GOOGLE_SECRET_KEY
but I'm pretty sure it's incomplete.
Also, I'm struggling to find where I should sign up for the google app id and secret key.
Thanks in advance. Graeme
The line I used in the end was ...
config.omniauth :google, GOOGLE_APP_ID, GOOGLE_SECRET, :scope => "http://www.google.com/m8/feeds http://picasaweb.google.com/data/"
Turns out I was missing the scope I needed to access Picasa, which was what was causing me problems.
这篇关于什么是正确的配置线,以获得设计,omniauth和谷歌工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!