omniauth-tiktok-oauth2 0.1.7 → 1.0.1

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: a7580d48fdd383e64dade11336bac72a5c3c5bf3d219d501f3e981179eff399c
4
+ data.tar.gz: 31137a8bf5171f087c36e319a7a80765b3efa0925361e9abb67f3e0519e25dbe
5
5
  SHA512:
6
- metadata.gz: 1f56cc2684c18aed9daeba4d1aea0272d0268751dbf71a679dfa1e590d0c01c905fb3aca561ebc6ed28b3a4ee61ac81df2fe55041bbb7f4f2b32bcabc9af7753
7
- data.tar.gz: '095fc878012b095261144ff2fd241fffefd735bec1523e76f93b96d314e73486e69cb3468be8937c08dc25093c65cbad83a4e16092921b07da68eae525e74587'
6
+ metadata.gz: f4da816e311f7a5cc229ff3e3d7480034c288fcfb5272cfff96c868899165b8561f7eb3711f6f378cda67d121ae1e8eb5de86c41ba1ff73d169fba0a4fc2a6a5
7
+ data.tar.gz: 317fba3d8d7e2974505230686a6b20c97374d146482b5ab134b699e94f1614e170df44bfb450d2a57f6a4ebead357f49e2e63dd690392a0edb26b0a194d6ff28
@@ -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
 
@@ -23,7 +23,7 @@ module OmniAuth
23
23
  end
24
24
  end
25
25
 
26
- uid{ raw_info['id'] }
26
+ uid{ raw_info['core_user_id'] }
27
27
 
28
28
  info do
29
29
  {
@@ -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.1'
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.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kristoffer Ek
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-08-01 00:00:00.000000000 Z
11
+ date: 2023-08-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: omniauth-oauth2
@@ -16,31 +16,31 @@ 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
- email:
43
+ email:
44
44
  executables: []
45
45
  extensions: []
46
46
  extra_rdoc_files: []
@@ -57,7 +57,7 @@ homepage: https://github.com/kristofferek/omniauth-tiktok-oauth2
57
57
  licenses:
58
58
  - MIT
59
59
  metadata: {}
60
- post_install_message:
60
+ post_install_message:
61
61
  rdoc_options: []
62
62
  require_paths:
63
63
  - lib
@@ -72,9 +72,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
72
72
  - !ruby/object:Gem::Version
73
73
  version: '0'
74
74
  requirements: []
75
- rubyforge_project:
75
+ rubyforge_project:
76
76
  rubygems_version: 2.7.6.2
77
- signing_key:
77
+ signing_key:
78
78
  specification_version: 4
79
79
  summary: A TikTok Marketing API OAuth2 strategy for OmniAuth
80
80
  test_files: []