omniauth-vkontakte 1.1.4 → 1.2.0

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
@@ -27,18 +27,6 @@ use OmniAuth::Builder do
27
27
  end
28
28
  ```
29
29
 
30
- ### Update to omniauth-oauth2 1.1.0
31
- Application raise "invalid credensials" when login. The reason is [csrf protection](https://github.com/intridea/omniauth-oauth2/pull/18) in omniauth-oauth2 1.1.0.
32
- Vkontakte doesn't return `state` parameter with the code, if the `scope` doesn't include `notify`.
33
-
34
- The solution is to specify at least the `notify` in parameter `scope`, like so:
35
-
36
- ```ruby
37
- use OmniAuth::Builder do
38
- provider :vkontakte, ENV['API_KEY'], ENV['API_SECRET'], :scope => 'notify'
39
- end
40
- ```
41
-
42
30
  ## Supported Rubies
43
31
 
44
32
  Tested with the following Ruby versions:
data/examples/sinatra.rb CHANGED
@@ -6,7 +6,7 @@ require 'sinatra'
6
6
  require 'omniauth'
7
7
  require 'omniauth-vkontakte'
8
8
 
9
- SCOPE = 'friends,audio,notify'
9
+ SCOPE = 'friends,audio'
10
10
 
11
11
  use Rack::Session::Cookie
12
12
 
@@ -11,7 +11,7 @@ module OmniAuth
11
11
  # @example Basic Usage
12
12
  # use OmniAuth::Strategies::Vkontakte, 'API Key', 'Secret Key'
13
13
  class Vkontakte < OmniAuth::Strategies::OAuth2
14
- DEFAULT_SCOPE = 'notify'
14
+ DEFAULT_SCOPE = ''
15
15
 
16
16
  option :name, 'vkontakte'
17
17
 
@@ -27,8 +27,6 @@ module OmniAuth
27
27
 
28
28
  option :authorize_options, [:scope, :display]
29
29
 
30
- option :provider_ignores_state, true
31
-
32
30
  uid { access_token.params['user_id'] }
33
31
 
34
32
  # https://github.com/intridea/omniauth/wiki/Auth-Hash-Schema
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module Vkontakte
3
- VERSION = "1.1.4"
3
+ VERSION = "1.2.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-vkontakte
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.4
4
+ version: 1.2.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-11-29 00:00:00.000000000 Z
12
+ date: 2012-12-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: omniauth