Troubleshooting | TTF Docs
Skip to main content
documentation

Troubleshooting

Resolve common CORS, SSO PKCE, token audience, and Formx submission issues.

Common Issues & Fixes

redirect_uri Mismatch on /api/sso/authorize

  • TTF SSO performs exact string matching on redirectUris (no trailing slash or wildcard prefix matching).
  • Ensure the redirect_uri parameter in /api/sso/authorize and POST /api/sso/token matches the registered URI character-for-character.

401 Unauthorized When Calling Business APIs with an SSO Token

  • Check if your app is registered as third_party in the Developer Console.
  • Third-party apps receive an identity token (aud: 'ttf-identity') which is only valid at GET /api/sso/userinfo and is intentionally rejected by authMiddleware on HRMS/CRM/Task Deck routes.

CORS Errors from Browser Requests

  • Ensure your app origin is listed in CORS_ORIGIN on master-backend.
  • Note that POST /api/forms/public/:token/submit allows any origin automatically (credentials: false) — do not send cookies or Authorization headers to public Formx submission URLs.

PKCE code_challenge_method Rejected

  • TTF SSO requires code_challenge_method=S256. Plaintext plain PKCE is rejected by design.

Last updated on