omniauth-tiktok-loginkit 0.1.2 → 1.1.0

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: ec9efb4e7e1fd15d2a281eff5dd6fb51f7ab1beee097258f045d1afbfa26e940
4
- data.tar.gz: 440617b46ff9e4f76b989bea6749c664bd8103bfe46a3e4f5c9ef3e10f630a48
3
+ metadata.gz: 3e6f9c1ebe11010118a7f9317c1d49769096f973ae5c52998b7ddafa108a62d0
4
+ data.tar.gz: 8d1306c208fc6d828e4ffbcb1ea1c4e2f26d02b209d8fdba896ced005b6ace9a
5
5
  SHA512:
6
- metadata.gz: 968214817a2f1de8b5a4a90983711e8b44098fc0c7289c117da317f15acec3d8a720e5eb7d1154592c71e946bf3f045e83a23e65d6ee9065d71d956bace3479e
7
- data.tar.gz: eecbd23794bff3a8038e9f13046183b2f1d3c5a170d5234d8661c9e7840b11f9ff7bb7c0a8ee0016322ec210da74b8b8a949ac4b633d258aede2c8abe05f1406
6
+ metadata.gz: 8f15ba1f72abc1be400f176ac8212c6322efe5ef0779893c6b87e085757330e9666485da968b178d4697726b2e1082623132a17748b073462b08018c0945aaea
7
+ data.tar.gz: 0b4e56f65fa9be25e6ae423b3bc5f0ab7df8c94d272ba5099332a108431fd633190f2b173ca96ae80f5106e93c7d6cbb2da2338adb87f6c35eb17b388c864df8
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.7.8
1
+ 3.4.2
data/README.md CHANGED
@@ -1,11 +1,19 @@
1
1
  # omniauth-tiktok-loginkit
2
2
 
3
+ [![rspec](https://github.com/layerssss/omniauth-tiktok-loginkit/actions/workflows/rspec.yml/badge.svg)](https://github.com/layerssss/omniauth-tiktok-loginkit/actions/workflows/rspec.yml)
4
+ [![rubocop](https://github.com/layerssss/omniauth-tiktok-loginkit/actions/workflows/rubocop.yml/badge.svg)](https://github.com/layerssss/omniauth-tiktok-loginkit/actions/workflows/rubocop.yml)
5
+ [![Gem Version](https://badge.fury.io/rb/omniauth-tiktok-loginkit.svg)](https://badge.fury.io/rb/omniauth-tiktok-loginkit)
6
+
3
7
  OmniAuth Strategy for TikTok [LoginKit](https://developers.tiktok.com/doc/login-kit-overview/)
4
8
 
5
9
  Using TikTok Oauth API v2.
6
10
 
7
11
  ## Config
8
12
 
13
+ ```
14
+ gem "omniauth-tiktok-loginkit"
15
+ ```
16
+
9
17
  Configure with CLIENT_KEY and CLIENT_SECRET from TikTok Developers Portal (https://developers.tiktok.com/apps/). Note CLIENT_KEY is the value of "Client Key" field, not "App ID" on the portal.
10
18
 
11
19
  TikTok requires apps to be approved by review before it can access any APIs, including the Oauth APIs. Also any configuration change to the app will cause it to be back in "Staging" status. So please configure all neccessary "Redirect URI" correctly before submitting a review.
@@ -77,6 +77,9 @@ module OmniAuth
77
77
  if scopes.include?("user.info.profile")
78
78
  fields.push("profile_web_link", "profile_deep_link", "bio_description", "is_verified", "username")
79
79
  end
80
+ if scopes.include?("user.info.stats")
81
+ fields.push("follower_count", "following_count", "likes_count", "video_count")
82
+ end
80
83
  response = access_token
81
84
  .get(
82
85
  USER_INFO_URL,
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module OmniauthTiktokLoginkit
4
- VERSION = "0.1.2"
4
+ VERSION = "1.1.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-tiktok-loginkit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Yin
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2024-04-13 00:00:00.000000000 Z
10
+ date: 2025-02-17 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: oauth2
@@ -52,26 +51,6 @@ dependencies:
52
51
  - - "~>"
53
52
  - !ruby/object:Gem::Version
54
53
  version: '1.0'
55
- description: "# omniauth-tiktok-loginkit\n\nOmniAuth Strategy for TikTok [LoginKit](https://developers.tiktok.com/doc/login-kit-overview/)\n\nUsing
56
- TikTok Oauth API v2.\n\n## Config\n\nConfigure with CLIENT_KEY and CLIENT_SECRET
57
- from TikTok Developers Portal (https://developers.tiktok.com/apps/). Note CLIENT_KEY
58
- is the value of \"Client Key\" field, not \"App ID\" on the portal.\n\nTikTok requires
59
- apps to be approved by review before it can access any APIs, including the Oauth
60
- APIs. Also any configuration change to the app will cause it to be back in \"Staging\"
61
- status. So please configure all neccessary \"Redirect URI\" correctly before submitting
62
- a review.\n\nTikTok also rejects any \"Test App\", so it's better to configure test
63
- / dev environment redirect URI on the production app.\n\n```\nRails.application.config.middleware.use
64
- OmniAuth::Builder do\n provider(\n :tiktok_loginkit, \n CLIENT_KEY,
65
- \n CLIENT_SECRET,\n *options\n )\nend\n```\n\n...Or with devise
66
- (https://github.com/heartcombo/devise#omniauth)\n\n```\n# config/initializers/devise.rb\nconfig.omniauth(\n
67
- \ :tiktok_loginkit, \n CLIENT_KEY, \n CLIENT_SECRET, \n ...options\n)\n\n```\n\n##
68
- Options\n\n* `name`: change endpoint to /auth/tiktok_another, /auth/tiktok_another/callback.
69
- default: `\"tiktok_login\"`\n* `skip_info`: skip User Info API call to retrieve
70
- `info` hash. default: `false`\n* `scope`: oauth scopes, seperated by comma. default:
71
- `\"user.info.basic\"`\n\n\n## Usage\n\nExample of `request.env[\"omniauth.auth\"]`
72
- can be found in the specs:\n\n* [with default scope: user.info.basic](https://github.com/layerssss/omniauth-tiktok-loginkit/blob/main/spec/omniauth/strategies/tiktok_loginkit_spec.rb#L108)\n*
73
- [more detailed user info with scopes: user.info.basic,user.info.profile](https://github.com/layerssss/omniauth-tiktok-loginkit/blob/main/spec/omniauth/strategies/tiktok_loginkit_spec.rb#L263)\n\n##
74
- License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT)."
75
54
  email:
76
55
  - layerssss@gmail.com
77
56
  executables: []
@@ -95,7 +74,6 @@ metadata:
95
74
  homepage_uri: https://github.com/layerssss/omniauth-tiktok-loginkit
96
75
  source_code_uri: https://github.com/layerssss/omniauth-tiktok-loginkit
97
76
  changelog_uri: https://github.com/layerssss/omniauth-tiktok-loginkit/blob/main/CHANGELOG.md
98
- post_install_message:
99
77
  rdoc_options: []
100
78
  require_paths:
101
79
  - lib
@@ -110,8 +88,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
110
88
  - !ruby/object:Gem::Version
111
89
  version: '0'
112
90
  requirements: []
113
- rubygems_version: 3.1.6
114
- signing_key:
91
+ rubygems_version: 3.6.2
115
92
  specification_version: 4
116
93
  summary: OmniAuth Strategy for TikTok LoginKit
117
94
  test_files: []