raw .md

Concepts

Two kinds of account

GAUTH separates two kinds of account.

  • A client account owns applications. You use it to register apps, manage their users and issue credentials.
  • An app user belongs to one application, or to one app family when sub-apps are used. App users sign in through your app.

The two account types have separate sign-in policies. Client sign-ins are strictly rate-limited. App user sign-ins are lenient by default and can be tuned per app.

Objects

objectidentifiernotes
clientcid like c_4m2x9powns apps, holds a management key
appapp_key like app_1a2b3c4d5e6f7a8bpublic identifier, plus a private app_secret
sub-appapp_keyan app with parent_app_id set, shares the parent user pool
app useruid like a_9k2m4xbelongs to one app or app family
tokencgt_...short-lived bearer token
client keygtk_...long-lived management key
app secretgsk_...long-lived app credential
app user keygak_...long-lived per-account key

The uid is your join key

The uid is the stable identifier for an app user. It never changes and it is not a secret. Store it in your own database and key your rows on it.

Do not key your database on a token. Tokens expire and are replaced.

Tokens

A Certified Gump Token is a bearer token. It is short-lived. There are no refresh tokens: when a token expires, run the token request again.

A token carries a scope.

scopewhowhat it can do
clienta client password grantmanage that client's apps and profile
app profilean app user password or code grantread and update that app user's profile
appa client_credentials grantact as the app, no user

Sub-apps

A sub-app is an app with parent_app_id set. It shares its parent's user pool, so one app user account works across the family. Sub-apps cannot have their own sub-apps. Attach to the root app instead.

Key prefixes

Prefixes make a credential easy to identify in logs and secret scanners.

prefixkindused as
gtk_client management keyAuthorization: Bearer gtk_... on the management API
gsk_app secretclient_secret in token requests
gak_app user keyAuthorization: Bearer gak_... on the public API
cgt_session tokenAuthorization: Bearer cgt_... on the public API

Status values

Clients, apps and app users are either active or disabled. A disabled object cannot authenticate. Disabling a client, app or app user revokes the relevant sessions.

Timestamps

All timestamps are Unix seconds in UTC. The API returns integers, not strings.