omniauth-twitch 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +6 -11
- data/lib/omniauth/strategies/twitch.rb +8 -1
- data/lib/omniauth/twitch/version.rb +1 -1
- data/omniauth-twitch.gemspec +2 -2
- metadata +9 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: b268722aef004621781a7ffa006454b0bb28c75f6795ff047f19a8f1ea710e35
|
4
|
+
data.tar.gz: fff97d477cb6c0c73b46ecd59b4c5961301b435aa918dadd432e03168cfc5f08
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dc77dc2a7a3606cf7b9e8b62c692f4ccab9bf2637b0052cbac6cd3214f8f633a30d0a52d4bc2b138f6fdb10adf23d1b683a6f7794fe799d50bc75a6cf982d4fe
|
7
|
+
data.tar.gz: b584d9a832cd3c19ac665177599cae446495f430ad4601df8643c0f2ed6c6d62d7673992fcc706f1479b563030c1a5c8985ef56faf751065c44767420b3db1f3
|
data/README.md
CHANGED
@@ -2,21 +2,16 @@
|
|
2
2
|
|
3
3
|
# OmniAuth::Twitch
|
4
4
|
|
5
|
-
A OmniAuth strategy for Twitch
|
5
|
+
A OmniAuth strategy for Twitch
|
6
6
|
|
7
7
|
## Installation
|
8
8
|
|
9
|
-
Add
|
9
|
+
Add the OmniAuth Twitch and OmniAuth gem rails_csrf_protection gems to your Gemfile
|
10
10
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
$ bundle
|
16
|
-
|
17
|
-
Or install it yourself as:
|
18
|
-
|
19
|
-
$ gem install omniauth-twitch
|
11
|
+
```ruby
|
12
|
+
gem 'omniauth-twitch'
|
13
|
+
gem 'omniauth-rails_csrf_protection'
|
14
|
+
```
|
20
15
|
|
21
16
|
## Usage
|
22
17
|
|
@@ -10,7 +10,8 @@ module OmniAuth
|
|
10
10
|
option :client_options, {
|
11
11
|
site: "https://id.twitch.tv",
|
12
12
|
authorize_url: "/oauth2/authorize",
|
13
|
-
token_url: "/oauth2/token"
|
13
|
+
token_url: "/oauth2/token",
|
14
|
+
auth_scheme: :request_body
|
14
15
|
}
|
15
16
|
|
16
17
|
option :access_token_options, {
|
@@ -20,6 +21,12 @@ module OmniAuth
|
|
20
21
|
|
21
22
|
option :authorize_options, [:scope]
|
22
23
|
|
24
|
+
def request_phase
|
25
|
+
redirect client.auth_code.
|
26
|
+
authorize_url({ redirect_uri: callback_url }.merge(authorize_params)).
|
27
|
+
gsub(/%2[b,B]/, "+")
|
28
|
+
end
|
29
|
+
|
23
30
|
credentials do
|
24
31
|
hash = { "token" => access_token.token }
|
25
32
|
if access_token.refresh_token
|
data/omniauth-twitch.gemspec
CHANGED
@@ -6,8 +6,8 @@ require 'omniauth/twitch/version'
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.name = "omniauth-twitch"
|
8
8
|
spec.version = OmniAuth::Twitch::VERSION
|
9
|
-
spec.authors = ["Jonathan Gertig (Webtheory)
|
10
|
-
spec.email = ["jcgertig@gmail.com
|
9
|
+
spec.authors = ["Dean Perry", "Jonathan Gertig (Webtheory)", "William Holt (Webtheory)"]
|
10
|
+
spec.email = ["dean@deanpcmad.com", "jcgertig@gmail.com", "sithtoast@gmail.com"]
|
11
11
|
spec.summary = 'Twitch OAuth2 Strategy for OmniAuth'
|
12
12
|
spec.homepage = "https://github.com/WebTheoryLLC/omniauth-twitch"
|
13
13
|
spec.license = "MIT"
|
metadata
CHANGED
@@ -1,14 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-twitch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
7
|
+
- Dean Perry
|
8
|
+
- Jonathan Gertig (Webtheory)
|
9
|
+
- William Holt (Webtheory)
|
8
10
|
autorequire:
|
9
11
|
bindir: bin
|
10
12
|
cert_chain: []
|
11
|
-
date:
|
13
|
+
date: 2022-10-28 00:00:00.000000000 Z
|
12
14
|
dependencies:
|
13
15
|
- !ruby/object:Gem::Dependency
|
14
16
|
name: omniauth-oauth2
|
@@ -54,7 +56,9 @@ dependencies:
|
|
54
56
|
version: '0'
|
55
57
|
description:
|
56
58
|
email:
|
57
|
-
-
|
59
|
+
- dean@deanpcmad.com
|
60
|
+
- jcgertig@gmail.com
|
61
|
+
- sithtoast@gmail.com
|
58
62
|
executables: []
|
59
63
|
extensions: []
|
60
64
|
extra_rdoc_files: []
|
@@ -88,8 +92,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
88
92
|
- !ruby/object:Gem::Version
|
89
93
|
version: '0'
|
90
94
|
requirements: []
|
91
|
-
|
92
|
-
rubygems_version: 2.6.14
|
95
|
+
rubygems_version: 3.3.7
|
93
96
|
signing_key:
|
94
97
|
specification_version: 4
|
95
98
|
summary: Twitch OAuth2 Strategy for OmniAuth
|