omniauth-tiktok-oauth2 0.1.4 → 0.1.7
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 350cdc9995525e2eba649505e92d978073a116f896e7cd306512b3854b3fa7d7
|
4
|
+
data.tar.gz: 9cedebefc8046d284a3294236257d452d8f8b8e9126aa70796792f80ec43729d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1f56cc2684c18aed9daeba4d1aea0272d0268751dbf71a679dfa1e590d0c01c905fb3aca561ebc6ed28b3a4ee61ac81df2fe55041bbb7f4f2b32bcabc9af7753
|
7
|
+
data.tar.gz: '095fc878012b095261144ff2fd241fffefd735bec1523e76f93b96d314e73486e69cb3468be8937c08dc25093c65cbad83a4e16092921b07da68eae525e74587'
|
@@ -1,19 +1,19 @@
|
|
1
1
|
require 'oauth2'
|
2
2
|
require 'omniauth/strategies/oauth2'
|
3
3
|
|
4
|
-
OAuth2::Response.register_parser(:tiktok, [
|
5
|
-
JSON.parse(body)
|
4
|
+
OAuth2::Response.register_parser(:tiktok, []) do |body|
|
5
|
+
JSON.parse(body).fetch('data') rescue body
|
6
6
|
end
|
7
7
|
|
8
8
|
module OmniAuth
|
9
9
|
module Strategies
|
10
10
|
class TiktokOauth2 < OmniAuth::Strategies::OAuth2
|
11
|
-
USER_INFO_URL = 'https://
|
11
|
+
USER_INFO_URL = 'https://business-api.tiktok.com/open_api/v1.2/user/info/'
|
12
12
|
option :name, "tiktok_oauth2"
|
13
13
|
option :client_options,
|
14
|
-
site: 'https://
|
15
|
-
authorize_url: 'https://ads.tiktok.com/marketing_api/auth',
|
16
|
-
token_url: 'https://
|
14
|
+
site: 'https://business-api.tiktok.com/',
|
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/'
|
17
17
|
|
18
18
|
option :pkce, true
|
19
19
|
|
@@ -49,7 +49,7 @@ module OmniAuth
|
|
49
49
|
options.token_params.merge(
|
50
50
|
app_id: options.client_id,
|
51
51
|
secret: options.client_secret,
|
52
|
-
auth_code: request.params["
|
52
|
+
auth_code: request.params["auth_code"],
|
53
53
|
parse: :tiktok,
|
54
54
|
)
|
55
55
|
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: 0.1.7
|
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: 2022-08-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: omniauth-oauth2
|
@@ -40,7 +40,7 @@ dependencies:
|
|
40
40
|
version: '1.1'
|
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: []
|