Sign in with TTF (SSO Overview)
Central OAuth 2.0 Authorization Code + PKCE authentication powering every TTF app and third-party Developer Console integrations.
How "Sign in with TTF" Works
Sign in with TTF is built on master-backend (/api/sso/*) using standard OAuth 2.0 Authorization Code + PKCE (S256) — the same flow as "Sign in with Google". Log into one TTF app, and every other TTF app silently signs you in via the central session cookie.
- Your app redirects the browser to
GET /api/sso/authorizewithclient_id,redirect_uri,response_type=code,state,code_challenge, andcode_challenge_method=S256. - If the visitor holds an active central session cookie (
SSO_SESSION_TTL_HOURS, default 12h), the server immediately redirects back with?code=...&state=.... Otherwise, it displays the hosted login page. - Your callback route calls
POST /api/sso/tokenwithcode+code_verifier. - First-party apps receive
{ token, refreshToken, user }matchingPOST /api/auth/login. Third-party apps receive a scoped identity token (aud: 'ttf-identity') valid forGET /api/sso/userinfo.
Every SsoClient carries a trust level: 'first_party' (internal TTF apps receiving full login tokens) or 'third_party' (external developer apps receiving restricted 1-hour identity tokens after user consent).
Choose Your Integration Path
- First-Party PKCE Flow: For internal TTF apps registered via superadmin
/api/sso/clients. - Third-Party Developer Console: Self-service registration at
https://console.timetofuture.comfor external web/mobile apps requestingprofileandemailscopes.
Last updated on
