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 +4 -4
- data/lib/omniauth/strategies/tiktok_oauth2.rb +14 -3
- data/lib/omniauth-tiktok-oauth2/version.rb +1 -1
- data/omniauth-tiktok-oauth2.gemspec +2 -2
- metadata +13 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a7580d48fdd383e64dade11336bac72a5c3c5bf3d219d501f3e981179eff399c
|
4
|
+
data.tar.gz: 31137a8bf5171f087c36e319a7a80765b3efa0925361e9abb67f3e0519e25dbe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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.
|
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['
|
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
|
@@ -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.
|
16
|
-
gem.add_runtime_dependency 'oauth2', '
|
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
|
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:
|
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.
|
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.
|
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:
|
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:
|
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: []
|