live · mainnetoc · docs
specs · api · guides
docs / documentation

@orangecheck/auth-core


@orangecheck/auth-core / readSessionCookie

Function: readSessionCookie()

function readSessionCookie(cookieHeader: string | null | undefined): string | null;

Defined in: src/index.ts:238

Read the oc_session token out of a raw Cookie: header string. Returns null if the cookie is missing or empty.

Parameters

ParameterType
cookieHeaderstring | null | undefined

Returns

string | null