Skip to content

Commit

Permalink
Merge pull request #1441 from buggle/master
Browse files Browse the repository at this point in the history
fixed require for google_oauth2 strategy
  • Loading branch information
rafaelfranca committed Nov 14, 2011
2 parents a71319a + 065963f commit 03b56ff
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions Gemfile
Expand Up @@ -11,6 +11,7 @@ gem "rdoc"
group :test do
gem 'omniauth-facebook'
gem 'omniauth-openid', '~> 1.0.1'
gem "omniauth-google-oauth2", '~> 0.1.4'
gem "webrat", "0.7.2", :require => false
gem "mocha", :require => false
end
Expand Down
2 changes: 1 addition & 1 deletion lib/devise/omniauth/config.rb
Expand Up @@ -28,7 +28,7 @@ def find_strategy
end

def require_strategy
if [:facebook, :github, :twitter].include?(provider.to_sym)
if [:facebook, :github, :twitter, :google_oauth2].include?(provider.to_sym)
require "omniauth/strategies/#{provider}"
elsif options[:require]
require options[:require]
Expand Down
2 changes: 1 addition & 1 deletion test/rails_app/config/initializers/devise.rb
Expand Up @@ -179,7 +179,7 @@
config.omniauth :facebook, 'APP_ID', 'APP_SECRET', :scope => 'email,offline_access'
config.omniauth :openid
config.omniauth :openid, :name => 'google', :identifier => 'https://www.google.com/accounts/o8/id'

config.omniauth :google_oauth2, 'APP_ID', 'APP_SECRET', :scope => 'https://www.googleapis.com/auth/userinfo.email'
# ==> Warden configuration
# If you want to use other strategies, that are not supported by Devise, or
# change the failure app, you can configure them inside the config.warden block.
Expand Down

0 comments on commit 03b56ff

Please sign in to comment.