omniauth-google-oauth2 0.1.8 → 0.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  Strategy to auth with Google via OAuth2 in OmniAuth.
4
4
 
5
+ Get your API key at https://code.google.com/apis/console/
6
+
5
7
  ## License
6
8
 
7
9
  Copyright (c) 2011 by Josh Ellithorpe
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module GoogleOauth2
3
- VERSION = "0.1.8"
3
+ VERSION = "0.1.9"
4
4
  end
5
5
  end
@@ -8,6 +8,7 @@ module OmniAuth
8
8
  DEFAULT_SCOPE = "userinfo.email,userinfo.profile"
9
9
 
10
10
  option :name, 'google_oauth2'
11
+ option :authorize_options, [:scope, :approval_prompt, :access_type]
11
12
 
12
13
  option :client_options, {
13
14
  :site => 'https://accounts.google.com',
@@ -23,8 +24,8 @@ module OmniAuth
23
24
  params[:scope] = scopes.join(' ')
24
25
  # This makes sure we get a refresh_token.
25
26
  # http://googlecode.blogspot.com/2011/10/upcoming-changes-to-oauth-20-endpoint.html
26
- params[:access_type] = 'offline'
27
- params[:approval_prompt] = 'force'
27
+ params[:access_type] = 'offline' if params[:access_type].nil?
28
+ params[:approval_prompt] = 'force' if params[:approval_prompt].nil?
28
29
  end
29
30
  end
30
31
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-google-oauth2
3
3
  version: !ruby/object:Gem::Version
4
- hash: 11
4
+ hash: 9
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 8
10
- version: 0.1.8
9
+ - 9
10
+ version: 0.1.9
11
11
  platform: ruby
12
12
  authors:
13
13
  - Josh Ellithorpe
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2011-12-09 00:00:00 -08:00
19
+ date: 2012-01-06 00:00:00 -08:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency