How to use google auth strategy?

127 views
Skip to first unread message

Max Zelinski

unread,
Jun 27, 2011, 1:17:01 PM6/27/11
to omni...@googlegroups.com
I'm having problems with google auth strategy
I configured google provider like this
provider :google, 'www.mysite.com', 'key'
but every time I want to login calling auth/google I got 
OAuth::Unauthorized (400 Bad Request)

I registered my domain at https://www.google.com/accounts/ManageDomain and I successfully confirmed it.
In 'Target URL path prefix:' I tried setting www.mysite.com, www.mysite.com/auth/google/callback but still getting Unauthorized.
Maybe this is the problem? What url should I put in 'Target URL path prefix'?

Max Zelinski

unread,
Jun 29, 2011, 1:54:27 PM6/29/11
to omni...@googlegroups.com
Anyone?

Max Zelinski

unread,
Jul 2, 2011, 5:11:15 AM7/2/11
to omni...@googlegroups.com
Hello?

Derek

unread,
Jul 4, 2011, 6:59:09 PM7/4/11
to omniauth
Hey Max,

To use the Google OAuth strategy for OmniAuth, try setting your
provider line like this:
provider :google, <Google Key>, <Google Secret>, :scope => <Google
Scopes>

1. You get your Google key and secret when you register an app with
Google: http://code.google.com/apis/accounts/docs/RegistrationForWebAppsAuto.html
2. You figure out what scopes you need by reading these docs:
http://code.google.com/apis/gdata/faq.html#AuthScopes

Let me know if you need more help.

Regards,
Derek Hopper
Lead Developer, Toutapp.com

On Jul 2, 2:11 am, Max Zelinski <max.zelin...@gmail.com> wrote:
> Hello?
Reply all
Reply to author
Forward
0 new messages