Skip to content

Graphorin API reference v0.1.0


Graphorin API reference / @graphorin/security / / postToTokenEndpoint

Function: postToTokenEndpoint()

ts
function postToTokenEndpoint(
   endpoint, 
   params, 
options?): Promise<TokenEndpointResponse>;

Defined in: packages/security/src/oauth/token-endpoint.ts:68

POST params to the token endpoint and return the parsed JSON body. The helper does not throw on non-2xx responses — the caller is responsible for branching on .ok so error responses can surface the spec-defined error / error_description fields.

Parameters

ParameterType
endpointstring
paramsReadonly<Record&lt;string, string&gt;>
options{ basicAuth?: string; signal?: AbortSignal; }
options.basicAuth?string
options.signal?AbortSignal

Returns

Promise&lt;TokenEndpointResponse&gt;

Stable