omniauth-tiktok-oauth2 0.1.7 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 350cdc9995525e2eba649505e92d978073a116f896e7cd306512b3854b3fa7d7
4
- data.tar.gz: 9cedebefc8046d284a3294236257d452d8f8b8e9126aa70796792f80ec43729d
3
+ metadata.gz: f0f7c838a11854fa944be3dbf59c7e0321821186d9d9ae3a5dd3623cfef90f79
4
+ data.tar.gz: 1ac288f82bc6e9e6a616dc4b2805646860a748b421e122ae22ce2b2cbfb9b6c9
5
5
  SHA512:
6
- metadata.gz: 1f56cc2684c18aed9daeba4d1aea0272d0268751dbf71a679dfa1e590d0c01c905fb3aca561ebc6ed28b3a4ee61ac81df2fe55041bbb7f4f2b32bcabc9af7753
7
- data.tar.gz: '095fc878012b095261144ff2fd241fffefd735bec1523e76f93b96d314e73486e69cb3468be8937c08dc25093c65cbad83a4e16092921b07da68eae525e74587'
6
+ metadata.gz: 84a724a5f1ed24bdefac94b59dfa40f41d0b80c67f6036a86290fdefe25605d1a988cf51de99c953985929945da6de91604956b3872f492b7cb2eca43dcb00cd
7
+ data.tar.gz: ffe4b51ca8d2e00dffbeac9b4132af5728aacf7623f3d229c46680768e0796661e5474f158f9b03559c2c2a710bd9b324914b1e10f9ce6eabc6f44a9cc9e83e6
@@ -8,12 +8,12 @@ end
8
8
  module OmniAuth
9
9
  module Strategies
10
10
  class TiktokOauth2 < OmniAuth::Strategies::OAuth2
11
- USER_INFO_URL = 'https://business-api.tiktok.com/open_api/v1.2/user/info/'
11
+ USER_INFO_URL = 'https://business-api.tiktok.com/open_api/v1.3/user/info/'
12
12
  option :name, "tiktok_oauth2"
13
13
  option :client_options,
14
14
  site: 'https://business-api.tiktok.com/',
15
15
  authorize_url: 'https://ads.tiktok.com/marketing_api/auth/',
16
- token_url: 'https://business-api.tiktok.com/open_api/v1.2/oauth2/access_token/'
16
+ token_url: 'https://business-api.tiktok.com/open_api/v1.3/oauth2/access_token/'
17
17
 
18
18
  option :pkce, true
19
19
 
@@ -63,6 +63,17 @@ module OmniAuth
63
63
  'Access-Token' => access_token.token,
64
64
  }
65
65
  end
66
+
67
+ def build_access_token
68
+ client.auth_code.get_token(
69
+ request.params['code'],
70
+ {
71
+ redirect_uri: callback_url,
72
+ headers: {'Content-Type' => 'application/json'},
73
+ }.merge(token_params.to_hash(symbolize_keys: true)),
74
+ deep_symbolize(options.auth_token_params)
75
+ )
76
+ end
66
77
  end
67
78
  end
68
79
  end
@@ -1,3 +1,3 @@
1
1
  module OmniAuthTiktokOauth2
2
- VERSION = '0.1.7'
2
+ VERSION = '1.0.0'
3
3
  end
@@ -12,6 +12,6 @@ Gem::Specification.new do |gem|
12
12
  gem.files = `git ls-files`.split("\n")
13
13
  gem.require_paths = ['lib']
14
14
 
15
- gem.add_runtime_dependency 'omniauth-oauth2', '~> 1.6'
16
- gem.add_runtime_dependency 'oauth2', '~> 1.1'
15
+ gem.add_runtime_dependency 'omniauth-oauth2', '~> 1.8'
16
+ gem.add_runtime_dependency 'oauth2', '>= 2.0.7'
17
17
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-tiktok-oauth2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kristoffer Ek
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-08-01 00:00:00.000000000 Z
11
+ date: 2023-01-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: omniauth-oauth2
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.6'
19
+ version: '1.8'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.6'
26
+ version: '1.8'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: oauth2
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '1.1'
33
+ version: 2.0.7
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: '1.1'
40
+ version: 2.0.7
41
41
  description: A TikTok Marketing API OAuth2 strategy for OmniAuth. This allows you
42
42
  to login with TikTok in your ruby app.
43
43
  email:
@@ -72,8 +72,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
72
72
  - !ruby/object:Gem::Version
73
73
  version: '0'
74
74
  requirements: []
75
- rubyforge_project:
76
- rubygems_version: 2.7.6.2
75
+ rubygems_version: 3.2.3
77
76
  signing_key:
78
77
  specification_version: 4
79
78
  summary: A TikTok Marketing API OAuth2 strategy for OmniAuth