Skip to content
0

katanakit-js / useBearerToken

Function: useBearerToken() ​

ts
function useBearerToken(input): string | null;

Defined in: src/core/services/auth.service.ts:230

Reads the bearer token from anything carrying headers.

Returns null for a missing or malformed header rather than an empty string, so a caller cannot mistake "no credential" for "empty credential".

Parameters ​

ParameterType
inputAuthRequestLike

Returns ​

string | null

Released under the MIT License.