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_uriparameter in/api/sso/authorizeandPOST /api/sso/tokenmatches the registered URI character-for-character.
401 Unauthorized When Calling Business APIs with an SSO Token
- Check if your app is registered as
third_partyin the Developer Console. - Third-party apps receive an identity token (
aud: 'ttf-identity') which is only valid atGET /api/sso/userinfoand is intentionally rejected byauthMiddlewareon HRMS/CRM/Task Deck routes.
CORS Errors from Browser Requests
- Ensure your app origin is listed in
CORS_ORIGINonmaster-backend. - Note that
POST /api/forms/public/:token/submitallows any origin automatically (credentials: false) — do not send cookies orAuthorizationheaders to public Formx submission URLs.
PKCE code_challenge_method Rejected
- TTF SSO requires
code_challenge_method=S256. PlaintextplainPKCE is rejected by design.
Last updated on
