omniauth-twitch 1.1.0 → 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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 498816f5bc8776ea22b24a32581a92a9cb7b787d
4
- data.tar.gz: 43b2daa8616073edf875802c62e48f838b8962eb
2
+ SHA256:
3
+ metadata.gz: b268722aef004621781a7ffa006454b0bb28c75f6795ff047f19a8f1ea710e35
4
+ data.tar.gz: fff97d477cb6c0c73b46ecd59b4c5961301b435aa918dadd432e03168cfc5f08
5
5
  SHA512:
6
- metadata.gz: a323dd1b635f0ea9f0b6152a362c89bc0e2da8129b3e2523450dff7806b74f60901cfe5a22e3afabbf302a992172b964cfedfad4db31b74149a9d40da0e364f6
7
- data.tar.gz: 454998d0e7c829bf16b45e5da503b25412e5aef299c9912f43a6e8cc347bbac764a6bc6a8a217b158b15faa79f576545ac3f639377f8d28e73fae35c3a1d366f
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 recently updated to helix api
5
+ A OmniAuth strategy for Twitch
6
6
 
7
7
  ## Installation
8
8
 
9
- Add this line to your application's Gemfile:
9
+ Add the OmniAuth Twitch and OmniAuth gem rails_csrf_protection gems to your Gemfile
10
10
 
11
- gem 'omniauth-twitch'
12
-
13
- And then execute:
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
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module Twitch
3
- VERSION = "1.1.0"
3
+ VERSION = "1.2.0"
4
4
  end
5
5
  end
@@ -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) and William Holt (Webtheory)"]
10
- spec.email = ["jcgertig@gmail.com or sithtoast@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.1.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
- - Jonathan Gertig (Webtheory) and William Holt (Webtheory)
7
+ - Dean Perry
8
+ - Jonathan Gertig (Webtheory)
9
+ - William Holt (Webtheory)
8
10
  autorequire:
9
11
  bindir: bin
10
12
  cert_chain: []
11
- date: 2020-05-12 00:00:00.000000000 Z
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
- - jcgertig@gmail.com or sithtoast@gmail.com
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
- rubyforge_project:
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