@oneplatform/sdk / AccessTokenAuthConfig
Interface: AccessTokenAuthConfig¶
Defined in: packages/sdk/src/types/client-options.ts:13
Properties¶
accessToken¶
readonlyaccessToken:string
Defined in: packages/sdk/src/types/client-options.ts:19
A JWT access token previously obtained from the Auth Service. The SDK sends it as-is and does NOT attempt token refresh on its own. Provide refreshToken to enable automatic refresh on 401.
refreshToken?¶
readonlyoptionalrefreshToken?: () =>Promise\<string|null>
Defined in: packages/sdk/src/types/client-options.ts:25
Invoked when a request fails with 401 Unauthorized. Return a fresh token or null to propagate the original AuthError.
Returns¶
Promise\<string | null>