Update to google email scope url

This commit is contained in:
Sooraj Balakrishnan 2011-09-03 00:49:25 +05:30
Родитель fa374ab629
Коммит 6be3bf0bff
1 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -20,9 +20,9 @@ module OmniAuth
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