# Codex — TikTok Subdomain and Login Kit Handoff **Date:** 2026-05-11 **Agent:** Codex **Repo:** `hermes-mcp` ## Current status ### Completed - `tiktok.squaremcp.com` is live over HTTPS and returns `200`. - TikTok verification file is live at: - `https://tiktok.squaremcp.com/tiktok/tiktokebJaRSVgFOD0hQE1YXb5XhZ3IvKw4LVn.txt` - The verification URL returns the exact expected body: - `tiktok-developers-site-verification=ebJaRSVgFOD0hQE1YXb5XhZ3IvKw4LVn` - DNS resolves: - `tiktok.squaremcp.com -> 104.190.60.129` - TLS certificate includes `tiktok.squaremcp.com` and is valid. - Ingress includes the `tiktok.squaremcp.com` host. - TikTok auth routes were implemented in repo code: - `GET /auth/tiktok/start` - `GET /auth/tiktok/callback` - The TikTok subdomain ingress was updated so `/auth/tiktok` should route to Hermes instead of the static site. ### Not yet completed - The new TikTok auth routes are not confirmed live in production yet. - The blocker is that the running `hermes-mcp` deployment is still on the old image digest. - Production Hermes also still needs live TikTok app credentials to complete Login Kit successfully. ## Live verification that already works ### TikTok verification URL `https://tiktok.squaremcp.com/tiktok/tiktokebJaRSVgFOD0hQE1YXb5XhZ3IvKw4LVn.txt` Expected and confirmed body: `text` `tiktok-developers-site-verification=ebJaRSVgFOD0hQE1YXb5XhZ3IvKw4LVn` ### Public video asset `https://squaremcp.com/squaremcp-tiktok-launch.mp4` This is the public asset intended for TikTok/Facebook pull-by-url publishing. ## What was changed locally ### Repo files changed - `src/index.ts` - added TikTok Login Kit helper functions - added `GET /auth/tiktok/start` - added `GET /auth/tiktok/callback` - added TikTok subdomain to allowed origins - includes earlier Facebook credential `pageId` fix in `/api/connect/:platform` - `product/site/squaremcp-k8s-ingress.yaml` - adds `tiktok.squaremcp.com` - routes `/auth/tiktok` to `hermes-mcp` - routes `/api/pilot-request` to `hermes-mcp` - routes `/` to `squaremcp-site` - `.env.example` - documents: - `TIKTOK_CLIENT_KEY` - `TIKTOK_CLIENT_SECRET` - `TIKTOK_REDIRECT_URI=https://tiktok.squaremcp.com/auth/tiktok/callback` - `TIKTOK_DEFAULT_ACCESS_TOKEN` - `SOCIAL_PUBLISHING_SETUP.md` - documents TikTok/Facebook setup and publish flow - `product/site/Dockerfile` - includes `product/site/tiktok/` verification directory in the image - `product/site/tiktok/tiktokebJaRSVgFOD0hQE1YXb5XhZ3IvKw4LVn.txt` - live verification file source ## Deployment state ### SquareMCP site - The site deployment was pinned to the new digest and the verification file is confirmed live. - Live site image digest that worked for the verification file: - `localhost:32000/squaremcp-site@sha256:918d436731d6232d241d93a9c33775372495c5b045ccec7e3dcf0fc761684208` ### Hermes - New built Hermes image was pushed as: - `localhost:32000/hermes-mcp@sha256:c6ea70ea50e1c82043780926008de8ace494677fb7f9d4a1c854fdebe90db5dc` - Running Hermes pod was still on the old digest when work paused: - `localhost:32000/hermes-mcp@sha256:9f49fe3a6fb64da77d9bbf60f431cd9ef5ae017324dfe5b7d8e4eb2c49a680ae` ## Exact next step for Kimi Update `hermes-k8s.yaml` to pin the new Hermes image digest. Change: ```yaml image: localhost:32000/hermes-mcp:latest ``` to: ```yaml image: localhost:32000/hermes-mcp@sha256:c6ea70ea50e1c82043780926008de8ace494677fb7f9d4a1c854fdebe90db5dc ``` Then apply and verify: ```bash microk8s kubectl apply -f /home/garfield/hermes-mcp/hermes-k8s.yaml microk8s kubectl rollout status deployment/hermes-mcp -n fetcherpay --timeout=180s microk8s kubectl get pods -n fetcherpay -l app=hermes-mcp -o jsonpath='{range .items[*]}{.metadata.name} {.status.containerStatuses[0].imageID}{"\n"}{end}' ``` After that, test: ```bash curl -I https://tiktok.squaremcp.com/auth/tiktok/start curl -I "https://tiktok.squaremcp.com/auth/tiktok/callback?code=test" ``` ## Required production env vars for successful TikTok Login Kit Hermes still needs these in production: - `TIKTOK_CLIENT_KEY` - `TIKTOK_CLIENT_SECRET` - `TIKTOK_REDIRECT_URI=https://tiktok.squaremcp.com/auth/tiktok/callback` Optional but useful for direct server-side posting: - `TIKTOK_DEFAULT_ACCESS_TOKEN` Without the client key and secret, the new callback page will render a configuration error instead of completing token exchange. ## Recommended TikTok developer portal values ### Login Kit redirect URI Use: `https://tiktok.squaremcp.com/auth/tiktok/callback` ### Verification URL prefix Use the TikTok subdomain and verification path already made live: - host: `tiktok.squaremcp.com` - verification file path under `/tiktok/` ## Practical bottom line - Domain and verification file setup is done. - Public video hosting is done. - The remaining work is a Hermes deployment pin plus TikTok app credentials. - Once those are in place, the Login Kit callback will be real and reviewable.