omniauth-tiktok-oauth2 0.1.5 → 0.1.6

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
2
  SHA256:
3
- metadata.gz: f6a858f30c0763f3eba852ceb425cb2cab4b1d2b8b1b73c9c79fb7b226986ef8
4
- data.tar.gz: e211f8f1b66bb0c99140925843bdbc0e1382ee479f28b146756d1408195db3af
3
+ metadata.gz: 8c6bd88bbacc4d220836b0ded8a09dcddd4fc26a4fb03d38361add2f566076b2
4
+ data.tar.gz: 621e54dcf518f174a95bd2b2abd9509287abb2cd330d17e0958815797f688309
5
5
  SHA512:
6
- metadata.gz: 05ee1bb111158675f48c63c0bbaa631bef6eac4e2f74276313bc8b8e253b086326e8de2e255152c85b81c5a3c9737fcfd7ec5c8fad4c6fdda2d5fe83478eeeee
7
- data.tar.gz: 14836cf555edbc51a0c509af8e35d058545be9523608a11ee4793921e9000877061e24b5666b2a85d2e97c2ae647274f292601e63ca4810c5167a68c2b740f66
6
+ metadata.gz: 9349cb8c42c54dfda87cb576f99baeb11753e333af8c1e474547e96b192d624450c86b91fae8c1dd39907d5a996732fa3c50df4cd5bcfba0639917936a54a536
7
+ data.tar.gz: cb5bf601f557361e4d28c10f27fc103f97fad95b234ae199c193e5dfd9c69c72ab0ede8fc18f9d6179fca5b8bccd8adb291f55fdf01bde098c2826f65fe791c9
@@ -2,18 +2,18 @@ require 'oauth2'
2
2
  require 'omniauth/strategies/oauth2'
3
3
 
4
4
  OAuth2::Response.register_parser(:tiktok, []) do |body|
5
- JSON.parse(body)['data']
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://ads.tiktok.com/open_api/v1.2/user/info/'
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://ads.tiktok.com',
14
+ site: 'https://business-api.tiktok.com',
15
15
  authorize_url: 'https://ads.tiktok.com/marketing_api/auth',
16
- token_url: 'https://ads.tiktok.com/open_api/v1.2/oauth2/access_token'
16
+ token_url: 'https://business-api.tiktok.com/open_api/v1.2/oauth2/access_token'
17
17
 
18
18
  option :pkce, true
19
19
 
@@ -1,3 +1,3 @@
1
1
  module OmniAuthTiktokOauth2
2
- VERSION = '0.1.5'
2
+ VERSION = '0.1.6'
3
3
  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.5
4
+ version: 0.1.6
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: 2021-04-23 00:00:00.000000000 Z
11
+ date: 2021-09-13 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: []