Skip to content
gist.link ↗

App authentication

Partner apps authenticate on two independent paths: users arrive through the suite’s SSO handshake, and your backend calls suite APIs with OAuth client credentials. Your app key is the JWT audience on both.

This is the same handshake every first-party suite app performs. When a user launches your app from the dashboard (or hits your app signed out):

  1. Redirect to the auth hub with your launch URL as the continue target:

    https://auth.gist.link/?continue=https://app.acme.com/launch

    The continue origin must be one of your manifest’s redirect_origins (registered when your app was approved) or the redirect falls back to the suite dashboard.

  2. The auth hub redirects back to your URL with tokens in the URL fragment (never sent to your server):

    https://app.acme.com/launch#gc_access_token=eyJ…&gc_refresh_token=eyJ…

    Read the fragment in your frontend, store the tokens, and scrub the fragment from the address bar.

  3. Verify the access token in your backend. It is a standard JWT signed by the auth service (JWKS at https://auth.api.gist.link/.well-known/jwks.json). Validate:

    • the signature and exp,
    • iss — the auth service,
    • aud — accept "suite" (a suite-wide session) tokens, or request an app-scoped token via the password/refresh grant with audience=<your app key>.

    The claims carry the user (sub, email, name), the organization (org), and roles. A token with your audience is only ever minted for organizations that have installed your app; per-member app blocks are enforced by auth at mint time.

Uninstalling revokes the org’s grant: new sign-ins to your audience fail with invalid_target.

Once listed, issue credentials from the partner console (client id + secret, shown exactly once). Exchange them for short-lived, org-bound access tokens:

Terminal window
curl -s https://auth.api.gist.link/oauth/token \
-u "$CLIENT_ID:$CLIENT_SECRET" \
-d grant_type=client_credentials \
-d audience=crm \
-d organization_id=<installing org uuid>
  • audience — the ONE product API this token targets (e.g. crm).
  • organization_id — the installing organization to act for. Tokens are always org-bound; you can only mint tokens for orgs that installed your app, and only for the product apps your manifest permissions touch.

Call the product API with the Bearer token. Operations are limited to your manifest permissions — anything else returns a permission error.

Rotate the secret from the console at any time; rotation invalidates the previous secret immediately.

Your API calls count against the installing organization’s machine budget (see Errors & rate limits). Back off on 429 responses using the Retry-After header.