From d754535442166b284ebe62108dac718dd534d785 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 12 Nov 2025 22:00:35 +0000 Subject: [PATCH 1/2] Initial plan From b5c2bc484256908f35072a093b7004919e37b799 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 12 Nov 2025 22:13:35 +0000 Subject: [PATCH 2/2] Add TikTok OAuth provider to console UI Co-authored-by: stnguyen90 <1477010+stnguyen90@users.noreply.github.com> --- src/lib/stores/oauth-providers.test.ts | 34 ++++++++++++++++++++++++++ src/lib/stores/oauth-providers.ts | 6 +++++ 2 files changed, 40 insertions(+) create mode 100644 src/lib/stores/oauth-providers.test.ts diff --git a/src/lib/stores/oauth-providers.test.ts b/src/lib/stores/oauth-providers.test.ts new file mode 100644 index 0000000000..33d1bc3893 --- /dev/null +++ b/src/lib/stores/oauth-providers.test.ts @@ -0,0 +1,34 @@ +import { describe, it, expect } from 'vitest'; +import { oAuthProviders } from './oauth-providers'; + +describe('oAuthProviders', () => { + it('should include TikTok provider', () => { + expect(oAuthProviders.tiktok).toBeDefined(); + expect(oAuthProviders.tiktok.name).toBe('TikTok'); + expect(oAuthProviders.tiktok.icon).toBe('tiktok'); + expect(oAuthProviders.tiktok.docs).toBe('https://developers.tiktok.com/doc/login-kit-web'); + expect(oAuthProviders.tiktok.component).toBeDefined(); + }); + + it('should have all providers with required fields', () => { + Object.entries(oAuthProviders).forEach(([key, provider]) => { + expect(provider.name).toBeDefined(); + expect(provider.icon).toBeDefined(); + expect(provider.component).toBeDefined(); + // docs is optional but should be a string if defined + if (provider.docs) { + expect(typeof provider.docs).toBe('string'); + } + }); + }); + + it('should have TikTok positioned alphabetically after tradeshiftBox and before twitch', () => { + const keys = Object.keys(oAuthProviders); + const tiktokIndex = keys.indexOf('tiktok'); + const tradeshiftBoxIndex = keys.indexOf('tradeshiftBox'); + const twitchIndex = keys.indexOf('twitch'); + + expect(tiktokIndex).toBeGreaterThan(tradeshiftBoxIndex); + expect(tiktokIndex).toBeLessThan(twitchIndex); + }); +}); diff --git a/src/lib/stores/oauth-providers.ts b/src/lib/stores/oauth-providers.ts index 47d426e9f9..7476728352 100644 --- a/src/lib/stores/oauth-providers.ts +++ b/src/lib/stores/oauth-providers.ts @@ -209,6 +209,12 @@ export const oAuthProviders: Record = { docs: 'https://developers.tradeshift.com/docs/api', component: Main }, + tiktok: { + name: 'TikTok', + icon: 'tiktok', + docs: 'https://developers.tiktok.com/doc/login-kit-web', + component: Main + }, twitch: { name: 'Twitch', icon: 'twitch',