omniauth-discord 0.1.3 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +0 -4
- data/README.md +10 -1
- data/lib/omniauth/discord/version.rb +1 -1
- data/lib/omniauth/strategies/discord.rb +5 -7
- data/omniauth-discord.gemspec +0 -1
- metadata +3 -18
- data/.codeclimate.yml +0 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f0cfff1687d81aa3eefb32e70fa879fe1eb44f91
|
4
|
+
data.tar.gz: c29a03b00cf9ebb327ffd2fb14b2f69de575da44
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 603ce11732ed36580b68585063bba28e926026b527b5db61287b0f6e58d924164fcea84babd3b84188123d4d9a21c14ac5c34c609940b1d84db8115c6eca24c3
|
7
|
+
data.tar.gz: 1d4b99627158ba46dd207737496906d0a8a9ac1573c5ffdfa20fd407ba4462b4e928f214d41310ee66a4dfb46443a2ec52f23e12c458f1f500b6878aca26b810
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# OmniAuth Discord
|
1
|
+
# OmniAuth Discord
|
2
2
|
|
3
3
|
Discord OAuth2 Strategy for OmniAuth.
|
4
4
|
|
@@ -26,6 +26,15 @@ Rails.application.config.middleware.use OmniAuth::Builder do
|
|
26
26
|
end
|
27
27
|
```
|
28
28
|
|
29
|
+
By default, Discord does not return a user's email address. Set the scope to
|
30
|
+
`email` to get it:
|
31
|
+
|
32
|
+
```ruby
|
33
|
+
Rails.application.config.middleware.use OmniAuth::Builder do
|
34
|
+
provider :discord, ENV['DISCORD_APPID'], ENV['DISCORD_SECRET'], scope: 'email'
|
35
|
+
end
|
36
|
+
```
|
37
|
+
|
29
38
|
## Contributing
|
30
39
|
|
31
40
|
Bug reports and pull requests are welcome on GitHub at https://github.com/adaoraul/omniauth-discord.
|
@@ -19,11 +19,9 @@ module OmniAuth
|
|
19
19
|
|
20
20
|
info do
|
21
21
|
{
|
22
|
-
:
|
23
|
-
:
|
24
|
-
:
|
25
|
-
:avatar => raw_info['avatar'],
|
26
|
-
:verified => raw_info['verified']
|
22
|
+
:name => raw_info['username'],
|
23
|
+
:email => raw_info['email'],
|
24
|
+
:image => "https://cdn.discordapp.com/avatars/#{raw_info['id']}/#{raw_info['avatar']}"
|
27
25
|
}
|
28
26
|
end
|
29
27
|
|
@@ -34,7 +32,7 @@ module OmniAuth
|
|
34
32
|
end
|
35
33
|
|
36
34
|
def raw_info
|
37
|
-
@raw_info
|
35
|
+
@raw_info ||= access_token.get('users/@me').parsed
|
38
36
|
end
|
39
37
|
|
40
38
|
def callback_url
|
@@ -45,7 +43,7 @@ module OmniAuth
|
|
45
43
|
def authorize_params
|
46
44
|
super.tap do |params|
|
47
45
|
options[:authorize_options].each do |option|
|
48
|
-
params[option] = request.params[option.to_s]
|
46
|
+
params[option] = request.params[option.to_s] if request.params[option.to_s]
|
49
47
|
end
|
50
48
|
|
51
49
|
params[:redirect_uri] = options[:redirect_uri] unless options[:redirect_uri].nil?
|
data/omniauth-discord.gemspec
CHANGED
@@ -20,7 +20,6 @@ Gem::Specification.new do |spec|
|
|
20
20
|
|
21
21
|
spec.add_runtime_dependency 'omniauth-oauth2', '~> 1.4'
|
22
22
|
|
23
|
-
spec.add_development_dependency "codeclimate-test-reporter"
|
24
23
|
spec.add_development_dependency "dotenv"
|
25
24
|
spec.add_development_dependency "bundler"
|
26
25
|
spec.add_development_dependency "rake"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-discord
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adão Raul
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-08-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: omniauth-oauth2
|
@@ -24,20 +24,6 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.4'
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: codeclimate-test-reporter
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - ">="
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '0'
|
34
|
-
type: :development
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - ">="
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '0'
|
41
27
|
- !ruby/object:Gem::Dependency
|
42
28
|
name: dotenv
|
43
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -115,7 +101,6 @@ executables: []
|
|
115
101
|
extensions: []
|
116
102
|
extra_rdoc_files: []
|
117
103
|
files:
|
118
|
-
- ".codeclimate.yml"
|
119
104
|
- ".gitignore"
|
120
105
|
- ".rubocop.yml"
|
121
106
|
- ".travis.yml"
|
@@ -148,7 +133,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
148
133
|
version: '0'
|
149
134
|
requirements: []
|
150
135
|
rubyforge_project:
|
151
|
-
rubygems_version: 2.
|
136
|
+
rubygems_version: 2.6.11
|
152
137
|
signing_key:
|
153
138
|
specification_version: 4
|
154
139
|
summary: Discord OAuth2 Strategy for OmniAuth
|