Skip to content

Conversation

@maporto
Copy link

@maporto maporto commented May 7, 2025

Summary

This PR adds OAuth2 compatibility for TikTok by introducing support for a custom code_challenge format (hex) in the OAuth2 credential implementation. TikTok's PKCE flow requires the code challenge to be in hex format instead of the default base64.

Additionally, a new credential TikTok OAuth2 API was created that leverages this functionality, allowing users to authenticate with TikTok's API using the correct PKCE configuration.

How to test:

  • Create a new TikTok OAuth2 credential.
  • Confirm the code_challenge generated uses hex encoding.
  • Complete the TikTok OAuth2 flow successfully.

Related Linear tickets, Github issues, and Community forum posts

N/A

Review / Merge checklist

  • PR title and summary are descriptive. (conventions)
  • Docs updated or follow-up ticket created.
  • Tests included.
  • PR Labeled with release/backport (if the PR is an urgent fix that needs to be backported)

@CLAassistant
Copy link

CLAassistant commented May 7, 2025

CLA assistant check
All committers have signed the CLA.

@n8n-assistant n8n-assistant bot added community Authored by a community member core Enhancement outside /nodes-base and /editor-ui in linear Issue or PR has been created in Linear for internal review labels May 7, 2025
@Joffcom
Copy link
Member

Joffcom commented May 7, 2025

Hey @maporto,

Thanks for the PR, We have created "GHC-1888" as the internal reference to get this reviewed.

One of us will be in touch if there are any changes needed, in most cases this is normally within a couple of weeks but it depends on the current workload of the team.

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mrge found 1 issue across 6 files. Review it in mrge.io

@Joffcom
Copy link
Member

Joffcom commented May 7, 2025

Hey @maporto,

It would be better if the credential was a credential only node, You can check out the existing ones to see how to do this. Crowdstrike could be a good quick example.

@maporto
Copy link
Author

maporto commented May 9, 2025

Hey @maporto,

It would be better if the credential was a credential only node, You can check out the existing ones to see how to do this. Crowdstrike could be a good quick example.

Unlike Crowdstrike, Tiktok needs the authorize process to execute the entire token generation flow. This may not be the best example, I'm checking how to do this, if you have another example to help me I'd appreciate it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community Authored by a community member core Enhancement outside /nodes-base and /editor-ui in linear Issue or PR has been created in Linear for internal review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants