Raji
Raji

Reputation: 845

Configuration settings for Omniauth to Google in Rails

I am using Omniauth 1.0.1 in my Rails app for authentication. I have "omniauth-google-oauth2" gem for Google provider. But it shows me the error as

`rescue in provider': Could not find matching strategy for :google. You may need to install an additional gem (such as omniauth-google). (LoadError).

I gave "provider :google, 'domain.com', 'secret', :scope => 'https://mail.google.com/mail/feed/atom/'" in my initializers. Could u please tell me what went wrong? Thank u.

Upvotes: 6

Views: 3146

Answers (2)

Jeff Steil
Jeff Steil

Reputation: 1770

Try using

:google_oauth2

as your provider.

Upvotes: 5

Marek Příhoda
Marek Příhoda

Reputation: 11198

Since version 1.0, omniauth has taken out the individual strategies into separate gems. For more info, visit omniauth's page, and/or listen to eg this excellent railscast.

Upvotes: 1

Related Questions