Skip to content

Commit

Permalink
Revert "Fixed require_strategy for google_oauth2 omniauth strategy."
Browse files Browse the repository at this point in the history
This reverts commit 065963f.
  • Loading branch information
josevalim committed Nov 20, 2011
1 parent 1e37e42 commit dfb8ff3
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion Gemfile
Expand Up @@ -11,7 +11,6 @@ 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, :google_oauth2].include?(provider.to_sym)
if [:facebook, :github, :twitter].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 dfb8ff3

Please sign in to comment.