Skip to content

OAuthSecureTokenResult

OAuthSecureTokenResult = object & OAuthTokenResult | { mode: "vault"; handleId: string; tokenType?: string; expiresAt?: string | null; scopes?: string[]; }

Defined in: namespaces.ts:1404

Discriminated-union token result from the secure OAuth methods.

  • mode: "direct" — the raw token is returned inline (legacy-compatible).
  • mode: "vault" — the token lives in the fn-72 Vault; JS receives an opaque handle and should use oauth.buildAuthenticatedRequest(...) + network.executeRequest(...) so the raw token never crosses into JS.

object & OAuthTokenResult


{ mode: "vault"; handleId: string; tokenType?: string; expiresAt?: string | null; scopes?: string[]; }

mode: "vault"

handleId: string

Opaque vault handle for the stored token.

optional tokenType?: string

Token type (typically “Bearer”).

optional expiresAt?: string | null

Expiry timestamp in ISO 8601 format, or null.

optional scopes?: string[]

Granted scopes.