Permalink
Browse files

Update to google email scope url

  • Loading branch information...
1 parent fa374ab commit 6be3bf0bffa376c9706c87dec2f30bde055c3de5 @soorajb soorajb committed Sep 2, 2011
Showing with 3 additions and 3 deletions.
  1. +3 −3 oa-oauth/lib/omniauth/strategies/google_oauth2.rb
@@ -20,9 +20,9 @@ def initialize(app, client_id = nil, client_secret = nil, options = {}, &block)
end
def request_phase
- google_email_scope = "https://www.googleapis.com/auth/userinfo.email"
- options[:scope] ||= google_email_scope
- options[:scope] << "#{google_email_scope}" unless options[:scope] =~ %r[http[s]?:\/\/#{google_email_scope}]
+ google_email_scope = "www.googleapis.com/auth/userinfo.email"
+ options[:scope] ||= "https://#{google_email_scope}"
+ options[:scope] << "https://#{google_email_scope}" unless options[:scope] =~ %r[http[s]?:\/\/#{google_email_scope}]
redirect client.auth_code.authorize_url(
{:redirect_uri => callback_url, :response_type => "code"}.merge(options))
end

0 comments on commit 6be3bf0

Please sign in to comment.