omniauth-vkontakte 1.1.4 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +0 -12
- data/examples/sinatra.rb +1 -1
- data/lib/omniauth/strategies/vkontakte.rb +1 -3
- data/lib/omniauth-vkontakte/version.rb +1 -1
- metadata +2 -2
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
@@ -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 = '
|
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
|
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.
|
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-
|
12
|
+
date: 2012-12-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: omniauth
|