Third-Party Developer Console | TTF Docs
Skip to main content
sso

Third-Party Developer Console

Self-service OAuth2 registration at console.timetofuture.com for external apps requesting profile and email identity scopes.

Self-Service Registration

External developers can integrate "Sign in with TTF" without admin intervention through the TTF Developer Console (https://console.timetofuture.com):

  1. Developer Sign Up & Verification: Create a developer account (stored in Developer, separate from internal User records).
  2. Create App (POST /api/console/apps):
    • client_id is generated server-side to prevent collisions with internal clients like hrms or mail.
    • trust is locked to 'third_party' and allowedScopes defaults to ['profile', 'email'].
  3. Configure Redirect URIs & Icon: Add exact callback URLs and upload an optional app icon shown on the user consent screen.

What Changes for Third-Party Clients

  1. scope is required on GET /api/sso/authorize (space-separated profile and/or email).
  2. User Consent Screen: First login asks the user to Allow or Deny access (POST /api/sso/consent). Denying redirects back with ?error=access_denied. Approval is remembered (SsoConsent) for subsequent logins.
  3. Restricted Identity Token: POST /api/sso/token returns a short-lived (1 hour) JWT with aud: 'ttf-identity' and no refresh token.

Fetching User Identity

Use the identity token exclusively with GET /api/sso/userinfo:

bash
curl https://api.timetofuture.com/api/sso/userinfo \
  -H "Authorization: Bearer <ttf-identity-token>"
json
{
  "sub": "6712a9e0f23b120014a9b10c",
  "name": "Aarav Sharma",
  "email": "aarav@company.com"
}

Last updated on