class OmniAuth::Strategies::TiktokOauth2
Constants
- USER_INFO_URL
Public Instance Methods
callback_url()
click to toggle source
Remove params as callback URL must match exactly the URL defined for the application
Calls superclass method
# File lib/omniauth/strategies/tiktok_oauth2.rb, line 44 def callback_url super.split('?').first end
headers()
click to toggle source
# File lib/omniauth/strategies/tiktok_oauth2.rb, line 61 def headers { 'Access-Token' => access_token.token, } end
raw_info()
click to toggle source
# File lib/omniauth/strategies/tiktok_oauth2.rb, line 57 def raw_info @raw_info ||= access_token.get(USER_INFO_URL, headers: headers, parse: :tiktok).parsed end
token_params()
click to toggle source
# File lib/omniauth/strategies/tiktok_oauth2.rb, line 48 def token_params options.token_params.merge( app_id: options.client_id, secret: options.client_secret, auth_code: request.params["code"], parse: :tiktok, ) end