Skip to content

Token claims

This page lists the claims. For why the tokens are split the way they are, and how to choose which one to use, read Tokens: identity and authority.

Property Value
Algorithm By token. Access tokens: RS256, or EdDSA (Ed25519) when the operator sets FC_JWT_ACCESS_TOKEN_ALG=EdDSA. id_tokens: the OAuth client’s id_token_signed_response_alg, which is RS256 (default), EdDSA or ML-DSA-65. Field access tokens and client assertions: RS256 always. Session cookies: HS256, verified by the platform only. A verifier must accept only the algorithms it expects and refuse any other alg (the field token path pins RS256 explicitly). A verifier must not accept an alg from the token without checking it against the key’s type.
Header alg, kid (the key id), typ. Field access tokens use typ: fc-field+jwt.
Keys A rotating keyring held in the database (the default whenever the app key is set; FC_JWT_KEY_STORE=config keeps a single configured key instead). RS256, EdDSA and ML-DSA-65 keys rotate every 90 days and are published a day before they sign; the HS256 cookie key rotates every 30 days. Every token names its key in kid. The public keys are published at /.well-known/jwks.json: RSA (kty=RSA), Ed25519 (kty=OKP) and ML-DSA (kty=AKP). A verifier that sees an unknown kid should refetch the set. See Key rotation.
iss The platform’s public base URL (FC_JWT_ISSUER).
aud A bare string, never an array. Access tokens carry the platform audience; id_tokens carry the relying party’s client_id; field tokens carry the application code.
Timestamps exp, iat, nbf are Unix seconds (NumericDate), unlike the RFC 3339 strings elsewhere in the API.
jti An untyped TSID on access and field tokens.

An id_token can be signed with the same key as an access token, so the platform API accepts a bearer only if its aud includes the platform audience and its token_use is allowed. An id_token (whose aud is a relying party) therefore cannot be replayed as an API credential.

Token spelling. Every signed token the platform verifies must be spelled exactly as RFC 7515 base64url: three segments of the URL-safe alphabet only, no = padding, no + or /, no whitespace or line break, and the spare low bits of each segment’s last character zero. Anything else is refused as an invalid token (invalid_token, or invalid_dpop_proof for a DPoP proof), even when it decodes to the bytes of a valid one, so a token has one spelling. The platform’s own tokens are always canonical. Send a token exactly as you received it. The same rule covers the x and y of a public key in a proof header or at device enrolment. ID tokens from external identity providers are not covered. See Wire conventions.

Token Default Setting
Access token 3600 s FC_JWT_ACCESS_TOKEN_TTL_SECS (alias OIDC_ACCESS_TOKEN_TTL)
id_token 300 s, fixed not configurable
Session cookie token 86400 s OIDC_SESSION_TTL
Refresh token 604800 s (7 d), absolute for the family OIDC_REFRESH_TOKEN_TTL
Field access token 600 s FC_FIELD_ACCESS_TOKEN_TTL_SECS

Refresh tokens are opaque, not JWTs. Rotation carries the family’s original deadline forward, so a family dies a fixed time after first issuance whatever its activity. The token response also carries refresh_expires_in (seconds to that deadline) when it carries a refresh token. See Environment variables for the full list.

token_use says what a token may be used for.

token_use Where it comes from Accepted by the platform API
api client_credentials; an authorization-code login through an OAuth client flagged apiAccess Yes
identity An interactive login (authorization code and its refresh) through an ordinary OAuth client No: the API middleware refuses it
field A field-worker sign-in No: never an API credential
absent Session cookies and tokens minted before the marker existed Yes

The API middleware uses an allow-list (api or absent). A token class added later is closed to the API by default. A relying party should authenticate its user from the id_token and run its own session; the identity access token exists to satisfy the OAuth response shape and to call /oauth/userinfo.

Access token (token_use: api and identity)

Section titled “Access token (token_use: api and identity)”
Claim Type Meaning
iss, sub, exp, iat, nbf, jti Standard. sub is the principal id (prn_...).
aud string The platform audience (default flowcatalyst).
type string USER or SERVICE.
tier string Tenancy tier: ANCHOR, PARTNER or CLIENT. This was the scope claim in older tokens; scope now holds permissions.
scope string Granted permission codes, space-delimited: the principal’s permission ceiling (from its roles), narrowed to any permission scopes requested at the token endpoint. Omitted when no scope was computed, in which case permissions derive from roles. Requests for permissions the principal lacks are dropped, never granted; an explicit request that leaves nothing is invalid_scope.
email string Omitted for service accounts.
name string Display name.
clients string[] ["*"] for an anchor; otherwise "<clt_ id>:<identifier>" pairs (the bare id when the identifier is not known). Always present.
roles string[] Assigned role names (canonical app:role form). Always present.
applications string[] "<app_ id>:<code>" entries the principal may reach, or ["*"] for every application. Always present.
all_applications boolean Deprecated mirror of applications: ["*"], still emitted. Consumers should read the sentinel; the Go SDK reads either.
azp string The OAuth client the token was minted through. Absent for session tokens and for client_credentials, where the client is the principal. /oauth/userinfo uses it to confine its answer.
token_use string api or identity.

An identity access token carries only identity: type, tier, email, name and azp, with empty clients, roles and applications, and no scope.

When an OAuth client is flagged apiAccess, an interactive login gets an api token instead, narrowed to the client: only roles bound to the client’s applications, applications limited to the intersection of the user’s and the client’s, all_applications forced false, and scope derived from the narrowed roles. A client with no applications keeps the full role set.

Issued when the openid scope is requested. Signed with the algorithm the OAuth client chose (RS256 by default, EdDSA or ML-DSA-65); aud is the relying party’s client_id.

Claim Type Meaning
iss, sub, aud, exp, iat Standard. No nbf or jti.
auth_time number When the user signed in (not when the token was minted), for max_age checks.
nonce string Echoed from the authorisation request when sent.
azp string The client the token is for.
name, email string email omitted when the principal has none.
email_verified boolean Present whenever email is. It is always true and does not reflect real verification (the platform has no verification state yet). Do not rely on it to skip your own verification.
updated_at number The principal’s last modification, not the login time.
type, tier string As above.
client_id string The principal’s home client (clt_...); omitted for none.
roles string[] Narrowed to the OAuth client’s applications, so a relying party sees only roles relevant to its own application. A client with no applications gets the full list. Always present.
applications, clients string[] As above. Always present.
all_applications boolean As above.
portal_app_code, portal_app_id, portal_client_id string On portal logins through an app-linked portal OAuth client: which portal the user signed in to.

acr and amr are not emitted on platform id_tokens.

The fc_session cookie holds an HS256 JWT, verified by the platform only (cookies minted before the keyring are RS256 and keep verifying until they expire; with FC_JWT_KEY_STORE=config new cookies are RS256), with iss, sub, iat, nbf, exp, tier, email, clients, roles, applications, all_applications and scope (granted permissions, space-delimited). It has no aud. It is for the console and BFF routes; applications should not read it.

A portal identity is a separate identity plane. Its tokens prove identity and carry no authority.

Token Notes
Portal access token token_use: identity, sub is the portal identity id (ptu_...), type is USER, empty clients, roles and applications, azp the portal OAuth client.
Portal id_token sub is ptu_...; roles is empty (portal roles are portal-side data); portal_client_id names the tenant client, and portal_app_code / portal_app_id name the portal app when the OAuth client is linked to one.

tier is the empty string on portal tokens. That is deliberate: a portal identity is not a platform principal and has no tier. Treat a missing or empty tier as “not applicable” and never default it to CLIENT. See Portal identity.

Minted by /field/auth/*. JOSE header typ: fc-field+jwt. See Field identity protocol for the sign-in flows and the proof that must accompany it.

Claim Meaning
iss, sub, aud, exp, iat, nbf, jti Standard. sub is the worker id (fwu_...); aud is the application code.
token_use Always field.
client_id, client_identifier The tenant client id and its identifier.
worker_code, name The worker.
device_id The enrolled device; omitted for an unenrolled key.
device_mode PERSONAL, SHARED or UNENROLLED.
sid The login family id.
amr How the worker signed in: ["pin"], ["badge","pin"], ["badge"], ["hwk","uv"] (an unlock key: a hardware-held key and a user-verifying biometric, on a personal device), ["pin","imp"] or ["code","imp"].
auth_time When the worker signed in.
cnf {jkt}: the RFC 7638 thumbprint of the device key the token is bound to.
pcr true only while a PIN change is required. Accepted only at the PIN-change route.
act {sub, typ, name} when someone else is signed in as the worker; typ is field_worker or principal.
test true for a test identity.
linked_principal_id The platform user the worker is linked to. Audit correlation only; grants nothing.

A field token has no roles, scope, applications or clients claims.

GET or POST with a bearer access token. The answer is recomputed from the principal and confined to the token’s azp the same way the id_token was, so it is “the id_token’s claims, as of now”. It carries sub, name, tier, type, scope, clients, roles and applications, plus email and client_id when present. Without an azp (a session token or client_credentials) it falls back to the token’s own claims.

Other tokens exist for the platform’s own use and are not part of the contract: the short-lived HS256 tokens that carry a half-finished sign-in between steps (second-factor challenge; claims iss, sub, a prp purpose claim, iat, nbf, exp), and opaque refresh, enrolment and badge tokens.

For a platform access token: the signature against the JWKS (matching kid, and an alg you accept: RS256, plus EdDSA if the operator mints access tokens with it), iss, aud including your expected audience, exp, and token_use (accept api; refuse identity and field). For an id_token: signature, iss, aud equal to your client_id, exp, and the nonce you sent; the signature alg is whatever the client’s id_token_signed_response_alg says, so accept that one only. For a field token: typ, signature, iss, exp (required), token_use field, aud, no pcr, and the proof binding. Use the SDK’s validator rather than writing this by hand: every SDK has one.