Skip to main content

RefreshableCredential

@forge/monorepo


@forge/monorepo / backend/src / RefreshableCredential

Type Alias: RefreshableCredential

RefreshableCredential = Credential & object

Defined in: backend/src/tools/credentials.ts:314

A credential that stops working at a known time.

Additive by construction: RefreshableCredential is a Credential with one more field, so a resolver that returns a plain one is unchanged and the eight shipped toolkits compile untouched. That is AC-1, and it is a property of the type rather than a claim about the code.

The refresh token is deliberately not here. It lives wherever the host keeps it — ConnectionStore seals it (#261) — and only the refresher ever sees it. Putting it on the credential would mean the longest-lived secret in an OAuth grant travelling through every toolkit that only needed the short-lived one.

Type Declaration

expiresAt

readonly expiresAt: string

ISO 8601. When the vendor stops accepting this.