No release in over a year
A TikTok Marketing API OAuth2 strategy for OmniAuth. This allows you to login with TikTok in your ruby app.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 2.0.7
 Project Readme

OmniAuth TikTok (Marketing API) OAuth2 Strategy

Strategy to authenticate with TikTok (Marketing API) via OAuth2 in OmniAuth

Sign up and create your Application at https://ads.tiktok.com/i18n/login. Note the App ID and the App Secret.

For more details, read the docs: https://ads.tiktok.com/marketing_api/docs?rid=1dmrkuztuhi&id=100510

Installation

Add to your Gemfile:

gem 'omniauth-tiktok-oauth2'

Then bundle install.

Usage

Here's an example for adding the middleware to a Rails app in config/initializers/omniauth.rb:

Rails.application.config.middleware.use OmniAuth::Builder do
  provider :tiktok_oauth2, ENV['TIKTOK_APP_ID'], ENV['TIKTOK_SECRET']
end

You can now access the OmniAuth TikTok OAuth2 URL: /auth/tiktok_oauth2

Configuration

  • name: The name of the strategy. The default name is tiktok_oauth2 but it can be changed to any value, for example tiktok. The OmniAuth URL will thus change to /auth/tiktok and the provider key in the auth hash will then return tiktok.